Merge branch 'ta/parse-commit-with-skip-prefix'
[gitweb.git] / builtin / reflog.c
index 6eb24c8da27d265cad38628aeaa3e040dd298aab..c12a9784e6b45d50129b786a45bb5f4e4dd0801a 100644 (file)
@@ -561,7 +561,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 (!fnmatch(ent->pattern, ref, 0)) {
+               if (!wildmatch(ent->pattern, ref, 0, NULL)) {
                        if (!(slot & EXPIRE_TOTAL))
                                cb->expire_total = ent->expire_total;
                        if (!(slot & EXPIRE_UNREACH))
@@ -610,12 +610,12 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
                const char *arg = argv[i];
                if (!strcmp(arg, "--dry-run") || !strcmp(arg, "-n"))
                        cb.dry_run = 1;
-               else if (!prefixcmp(arg, "--expire=")) {
+               else if (starts_with(arg, "--expire=")) {
                        if (parse_expiry_date(arg + 9, &cb.expire_total))
                                die(_("'%s' is not a valid timestamp"), arg);
                        explicit_expiry |= EXPIRE_TOTAL;
                }
-               else if (!prefixcmp(arg, "--expire-unreachable=")) {
+               else if (starts_with(arg, "--expire-unreachable=")) {
                        if (parse_expiry_date(arg + 21, &cb.expire_unreachable))
                                die(_("'%s' is not a valid timestamp"), arg);
                        explicit_expiry |= EXPIRE_UNREACH;