wildmatch: remove unused wildopts parameter
[gitweb.git] / builtin / reflog.c
index 7e89e84dce04775dbf9809b6e43c4c06607e9d4e..96c82b4f5ef419f14425f47b2be699e7c87c3540 100644 (file)
@@ -16,14 +16,14 @@ static const char reflog_delete_usage[] =
 static const char reflog_exists_usage[] =
 "git reflog exists <ref>";
 
-static unsigned long default_reflog_expire;
-static unsigned long default_reflog_expire_unreachable;
+static timestamp_t default_reflog_expire;
+static timestamp_t default_reflog_expire_unreachable;
 
 struct cmd_reflog_expire_cb {
        struct rev_info revs;
        int stalefix;
-       unsigned long expire_total;
-       unsigned long expire_unreachable;
+       timestamp_t expire_total;
+       timestamp_t expire_unreachable;
        int recno;
 };
 
@@ -126,7 +126,7 @@ static int commit_is_complete(struct commit *commit)
                struct commit_list *parent;
 
                c = (struct commit *)study.objects[--study.nr].item;
-               if (!c->object.parsed && !parse_object(c->object.oid.hash))
+               if (!c->object.parsed && !parse_object(&c->object.oid))
                        c->object.flags |= INCOMPLETE;
 
                if (c->object.flags & INCOMPLETE) {
@@ -219,7 +219,7 @@ static int keep_entry(struct commit **it, struct object_id *oid)
 static void mark_reachable(struct expire_reflog_policy_cb *cb)
 {
        struct commit_list *pending;
-       unsigned long expire_limit = cb->mark_limit;
+       timestamp_t expire_limit = cb->mark_limit;
        struct commit_list *leftover = NULL;
 
        for (pending = cb->mark_list; pending; pending = pending->next)
@@ -284,7 +284,7 @@ static int unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit
  * Return true iff the specified reflog entry should be expired.
  */
 static int should_expire_reflog_ent(struct object_id *ooid, struct object_id *noid,
-                                   const char *email, unsigned long timestamp, int tz,
+                                   const char *email, timestamp_t timestamp, int tz,
                                    const char *message, void *cb_data)
 {
        struct expire_reflog_policy_cb *cb = cb_data;
@@ -392,8 +392,8 @@ static int collect_reflog(const char *ref, const struct object_id *oid, int unus
 
 static struct reflog_expire_cfg {
        struct reflog_expire_cfg *next;
-       unsigned long expire_total;
-       unsigned long expire_unreachable;
+       timestamp_t expire_total;
+       timestamp_t expire_unreachable;
        char pattern[FLEX_ARRAY];
 } *reflog_expire_cfg, **reflog_expire_cfg_tail;
 
@@ -415,7 +415,7 @@ static struct reflog_expire_cfg *find_cfg_ent(const char *pattern, size_t len)
        return ent;
 }
 
-static int parse_expire_cfg_value(const char *var, const char *value, unsigned long *expire)
+static int parse_expire_cfg_value(const char *var, const char *value, timestamp_t *expire)
 {
        if (!value)
                return config_error_nonbool(var);
@@ -433,7 +433,7 @@ static int reflog_expire_config(const char *var, const char *value, void *cb)
 {
        const char *pattern, *key;
        int pattern_len;
-       unsigned long expire;
+       timestamp_t expire;
        int slot;
        struct reflog_expire_cfg *ent;
 
@@ -485,7 +485,7 @@ static void set_reflog_expiry_param(struct cmd_reflog_expire_cb *cb, int slot, c
                return; /* both given explicitly -- nothing to tweak */
 
        for (ent = reflog_expire_cfg; ent; ent = ent->next) {
-               if (!wildmatch(ent->pattern, ref, 0, NULL)) {
+               if (!wildmatch(ent->pattern, ref, 0)) {
                        if (!(slot & EXPIRE_TOTAL))
                                cb->expire_total = ent->expire_total;
                        if (!(slot & EXPIRE_UNREACH))
@@ -515,7 +515,7 @@ static void set_reflog_expiry_param(struct cmd_reflog_expire_cb *cb, int slot, c
 static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
 {
        struct expire_reflog_policy_cb cb;
-       unsigned long now = time(NULL);
+       timestamp_t now = time(NULL);
        int i, status, do_all;
        int explicit_expiry = 0;
        unsigned int flags = 0;
@@ -616,7 +616,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
 }
 
 static int count_reflog_ent(struct object_id *ooid, struct object_id *noid,
-               const char *email, unsigned long timestamp, int tz,
+               const char *email, timestamp_t timestamp, int tz,
                const char *message, void *cb_data)
 {
        struct expire_reflog_policy_cb *cb = cb_data;