Merge branch 'pb/reflog-dwim'

* pb/reflog-dwim:
  builtin-reflog: Allow reflog expire to name partial ref
This commit is contained in:
Junio C Hamano 2008-08-20 23:42:22 -07:00
commit 16cccd8bff

View file

@ -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);