Merge branch 'jk/cat-file-regression-fix'
[gitweb.git] / builtin / reflog.c
index ba27f7cc614214eb32f60b684b3617c39a0066ef..852cff60b784d316cddb59234b6276dfe18fd75d 100644 (file)
@@ -365,7 +365,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
         * we take the lock for the ref itself to prevent it from
         * getting updated.
         */
-       lock = lock_any_ref_for_update(ref, sha1, 0);
+       lock = lock_any_ref_for_update(ref, sha1, 0, NULL);
        if (!lock)
                return error("cannot lock ref '%s'", ref);
        log_file = git_pathdup("logs/%s", ref);
@@ -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;