X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-reflog.c;h=6b3667ef0ebdfc2b8b70b24e474b22989fbf0cb7;hb=20f7a39825e30891056ab00ea620eaffda6aa451;hp=196fa03b7fac795475a0e12f0fa3b443cb34bd1d;hpb=0208c9611ab4e82b09feba857c4f9bc8e02a6d9d;p=git.git diff --git a/builtin-reflog.c b/builtin-reflog.c index 196fa03b7..6b3667ef0 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -540,11 +540,11 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix) free(collected.e); } - while (i < argc) { - const char *ref = argv[i++]; + for (; i < argc; i++) { + char *ref; unsigned char sha1[20]; - if (!resolve_ref(ref, sha1, 1, NULL)) { - status |= error("%s points nowhere!", ref); + if (!dwim_log(argv[i], strlen(argv[i]), sha1, &ref)) { + status |= error("%s points nowhere!", argv[i]); continue; } set_reflog_expiry_param(&cb, explicit_expiry, ref);