summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2ebc02d)
raw | patch | inline | side by side (parent: 2ebc02d)
author | Pieter de Bie <pdebie@ai.rug.nl> | |
Sun, 10 Aug 2008 20:22:21 +0000 (22:22 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 17 Aug 2008 23:24:46 +0000 (16:24 -0700) |
This allows you to specify 'git reflog expire master' without needing
to give the full refname like 'git reflog expire refs/heads/master'
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
to give the full refname like 'git reflog expire refs/heads/master'
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-reflog.c | patch | blob | history |
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 196fa03b7fac795475a0e12f0fa3b443cb34bd1d..6b3667ef0ebdfc2b8b70b24e474b22989fbf0cb7 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);