提交 55beff4f 编写于 作者: J Junio C Hamano

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: NJunio C Hamano <gitster@pobox.com>
上级 38881a90
......@@ -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;
}
......
......@@ -175,7 +175,7 @@ test_expect_success 'recover and check' '
'
test_expect_failure 'delete' '
test_expect_success 'delete' '
echo 1 > C &&
test_tick &&
git commit -m rat C &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册