diff --git a/builtin-reflog.c b/builtin-reflog.c
index da96da317be01c24ae9711206976f48f33e39f97..d95f515f2e32aa71c3a09fe5ed9486f352713360 100644 (file)
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
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);