summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 18a2197)
raw | patch | inline | side by side (parent: 18a2197)
author | Pieter de Bie <pdebie@ai.rug.nl> | |
Sat, 9 Aug 2008 23:33:29 +0000 (01:33 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Aug 2008 06:15:44 +0000 (23:15 -0700) |
This adds more tests for 'reflog delete' and marks it as
broken, as currently a call to 'git reflog delete HEAD@{1}'
deletes entries in the currently checked out branch's log,
not the HEAD log.
Noticed by John Wiegley
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
broken, as currently a call to 'git reflog delete HEAD@{1}'
deletes entries in the currently checked out branch's log,
not the HEAD log.
Noticed by John Wiegley
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1410-reflog.sh | patch | blob | history |
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 73f830db2374e751fb46e25b345e860979b9dd05..3b9860ea2ec4873d6e1135734817f76cde124032 100755 (executable)
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
'
-test_expect_success 'delete' '
+test_expect_failure 'delete' '
echo 1 > C &&
test_tick &&
git commit -m rat C &&
test_tick &&
git commit -m tiger C &&
- test 5 = $(git reflog | wc -l) &&
+ HEAD_entry_count=$(git reflog | wc -l)
+ master_entry_count=$(git reflog show master | wc -l)
+
+ test $HEAD_entry_count = 5 &&
+ test $master_entry_count = 5 &&
+
git reflog delete master@{1} &&
git reflog show master > output &&
- test 4 = $(wc -l < output) &&
+ test $(($master_entry_count - 1)) = $(wc -l < output) &&
+ test $HEAD_entry_count = $(git reflog | wc -l) &&
! grep ox < output &&
+ master_entry_count=$(wc -l < output)
+
+ git reflog delete HEAD@{1} &&
+ test $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&
+ test $master_entry_count = $(git reflog show master | wc -l) &&
+
+ HEAD_entry_count=$(git reflog | wc -l)
+
git reflog delete master@{07.04.2005.15:15:00.-0700} &&
git reflog show master > output &&
- test 3 = $(wc -l < output) &&
+ test $(($master_entry_count - 1)) = $(wc -l < output) &&
! grep dragon < output
'