Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'pb/reflog-dwim'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 21 Aug 2008 06:42:22 +0000
(23:42 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 21 Aug 2008 06:42:22 +0000
(23:42 -0700)
* pb/reflog-dwim:
builtin-reflog: Allow reflog expire to name partial ref
builtin-reflog.c
patch
|
blob
|
history
raw
(from parent 1:
4a871de
)
diff --git
a/builtin-reflog.c
b/builtin-reflog.c
index 196fa03b7fac795475a0e12f0fa3b443cb34bd1d..6b3667ef0ebdfc2b8b70b24e474b22989fbf0cb7 100644
(file)
--- 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
) {
- c
onst char *ref = argv[i++]
;
+
for (; i < argc; i++
) {
+ c
har *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);