summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-20 23:42:22 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-20 23:42:22 -0700
commit16cccd8bff6c0cf2700b169215a831ac63d6b145 (patch)
tree5e6d5462d313acb5584cbe658932d3130b8bd2ee
parent4a871de89680842ebd43429d5d972375fb765fda (diff)
parent90fb46ec83cd837364592ce4d95055a3b6fe89a4 (diff)
downloadgit-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.c8
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);