diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-14 07:35:50 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-14 07:35:50 -0800 |
commit | 006f424b2d014b8a7c4887b7ddbb57256dd6b8c7 (patch) | |
tree | e940ac6eff3809dfe3864c3861dfb66dfb3640de /t | |
parent | 37ad7ca7dbb0bef2b902f6bc7d3346ddff1667a5 (diff) | |
parent | ffa1eeaeea38f6d667e304f9b12c890b7c14d088 (diff) | |
download | git-006f424b2d014b8a7c4887b7ddbb57256dd6b8c7.tar.gz git-006f424b2d014b8a7c4887b7ddbb57256dd6b8c7.tar.xz |
Merge branch 'jk/maint-reflog-bottom' into maint
* jk/maint-reflog-bottom:
reflogs: clear flags properly in corner case
Diffstat (limited to 't')
-rwxr-xr-x | t/t1412-reflog-loop.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/t/t1412-reflog-loop.sh b/t/t1412-reflog-loop.sh new file mode 100755 index 000000000..7f519e5eb --- /dev/null +++ b/t/t1412-reflog-loop.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +test_description='reflog walk shows repeated commits again' +. ./test-lib.sh + +test_expect_success 'setup commits' ' + test_tick && + echo content >file && git add file && git commit -m one && + git tag one && + echo content >>file && git add file && git commit -m two && + git tag two +' + +test_expect_success 'setup reflog with alternating commits' ' + git checkout -b topic && + git reset one && + git reset two && + git reset one && + git reset two +' + +test_expect_success 'reflog shows all entries' ' + cat >expect <<-\EOF + topic@{0} two: updating HEAD + topic@{1} one: updating HEAD + topic@{2} two: updating HEAD + topic@{3} one: updating HEAD + topic@{4} branch: Created from HEAD + EOF + git log -g --format="%gd %gs" topic >actual && + test_cmp expect actual +' + +test_done |