diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-07-06 15:37:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-06 15:37:42 -0700 |
commit | 4d9e42f8f11c57b32b976a943c8ddaf6214e64b8 (patch) | |
tree | f1aee1490288aa30fb62a981696389d9b5e3e992 /t/t1410-reflog.sh | |
parent | checkout: do not write bogus reflog entry out (diff) | |
parent | GIT 1.6.0 (diff) | |
download | tgif-4d9e42f8f11c57b32b976a943c8ddaf6214e64b8.tar.xz |
Merge commit 'v1.6.0' into jc/checkout-reflog-fix
* commit 'v1.6.0': (2063 commits)
GIT 1.6.0
git-p4: chdir now properly sets PWD environment variable in msysGit
Improve error output of git-rebase
t9300: replace '!' with test_must_fail
Git.pm: Make File::Spec and File::Temp requirement lazy
Documentation: document the pager.* configuration setting
git-stash: improve synopsis in help and manual page
Makefile: building git in cygwin 1.7.0
git-am: ignore --binary option
bash-completion: Add non-command git help files to bash-completion
Fix t3700 on filesystems which do not support question marks in names
Utilise our new p4_read_pipe and p4_write_pipe wrappers
Add p4 read_pipe and write_pipe wrappers
bash completion: Add '--merge' long option for 'git log'
bash completion: Add completion for 'git mergetool'
git format-patch documentation: clarify what --cover-letter does
bash completion: 'git apply' should use 'fix' not 'strip'
t5304-prune: adjust file mtime based on system time rather than file mtime
test-parse-options: use appropriate cast in length_callback
Fix escaping of glob special characters in pathspecs
...
Conflicts:
builtin-checkout.c
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-x | t/t1410-reflog.sh | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh index f959aae846..5b24f05573 100755 --- a/t/t1410-reflog.sh +++ b/t/t1410-reflog.sh @@ -175,21 +175,44 @@ test_expect_success 'recover and check' ' ' -test_expect_success 'prune --expire' ' - - before=$(git count-objects | sed "s/ .*//") && - BLOB=$(echo aleph | git hash-object -w --stdin) && - BLOB_FILE=.git/objects/$(echo $BLOB | sed "s/^../&\//") && - test $((1 + $before)) = $(git count-objects | sed "s/ .*//") && - test -f $BLOB_FILE && - git reset --hard && - git prune --expire=1.hour.ago && - test $((1 + $before)) = $(git count-objects | sed "s/ .*//") && - test -f $BLOB_FILE && - test-chmtime -86500 $BLOB_FILE && - git prune --expire 1.day && - test $before = $(git count-objects | sed "s/ .*//") && - ! test -f $BLOB_FILE +test_expect_success 'delete' ' + echo 1 > C && + test_tick && + git commit -m rat C && + + echo 2 > C && + test_tick && + git commit -m ox C && + + echo 3 > C && + test_tick && + git commit -m tiger C && + + 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 $(($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 $(($master_entry_count - 1)) = $(wc -l < output) && + ! grep dragon < output ' |