diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-20 23:42:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-20 23:42:22 -0700 |
commit | 16cccd8bff6c0cf2700b169215a831ac63d6b145 (patch) | |
tree | 5e6d5462d313acb5584cbe658932d3130b8bd2ee | |
parent | 4a871de89680842ebd43429d5d972375fb765fda (diff) | |
parent | 90fb46ec83cd837364592ce4d95055a3b6fe89a4 (diff) | |
download | git-16cccd8bff6c0cf2700b169215a831ac63d6b145.tar.gz |
Merge branch 'pb/reflog-dwim'
* pb/reflog-dwim:
builtin-reflog: Allow reflog expire to name partial ref
-rw-r--r-- | builtin-reflog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-reflog.c b/builtin-reflog.c index 196fa03b7f..6b3667ef0e 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); |