summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 38881a9)
raw | patch | inline | side by side (parent: 38881a9)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Aug 2008 06:21:25 +0000 (23:21 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Aug 2008 06:21:25 +0000 (23:21 -0700) |
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>
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>
builtin-reflog.c | patch | blob | history | |
t/t1410-reflog.sh | patch | blob | history |
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 125d455b97ca499806ff417871ab6ce7aad922c5..7d7047d7924fab88995a35e54c02668c10390390 100644 (file)
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
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;
}
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 3b9860ea2ec4873d6e1135734817f76cde124032..5b24f05573221afb3dc472e78a443ba718db3c60 100755 (executable)
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
'
-test_expect_failure 'delete' '
+test_expect_success 'delete' '
echo 1 > C &&
test_tick &&
git commit -m rat C &&