diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-10 23:21:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-10 23:21:25 -0700 |
commit | 55beff4f536011e5d7f17ae63911f1bb56308feb (patch) | |
tree | 63868faf3b0347dc3750be3882847ffb8c138351 /builtin-reflog.c | |
parent | 38881a9066fcb3ce6e0438e6d7b20cce22ece411 (diff) | |
download | git-55beff4f536011e5d7f17ae63911f1bb56308feb.tar.gz |
Fix deleting reflog entries from HEAD reflog
dwim_ref() used to resolve HEAD symbolic ref to its target (i.e. current
branch). This incorrectly removed the reflog entry from the current
branch when 'git reflog delete HEAD@{1}' was asked for.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-reflog.c')
-rw-r--r-- | builtin-reflog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-reflog.c b/builtin-reflog.c index 125d455b97..7d7047d792 100644 --- a/builtin-reflog.c +++ b/builtin-reflog.c @@ -604,8 +604,8 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix) continue; } - if (!dwim_ref(argv[i], spec - argv[i], sha1, &ref)) { - status |= error("%s points nowhere!", argv[i]); + if (!dwim_log(argv[i], spec - argv[i], sha1, &ref)) { + status |= error("no reflog for '%s'", argv[i]); continue; } |