diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-13 14:33:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-13 14:33:19 -0800 |
commit | aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d (patch) | |
tree | 8e9410d69333688d32ccab097beaa48b10850833 /t | |
parent | 41e2edf41a6d501f1b8beca7f1f0bcbe9296dcc2 (diff) | |
parent | d8e87570c32b190af3991d180f37adb8cf5eb99c (diff) | |
download | git-aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d.tar.gz |
Merge branch 'maint'
* maint:
config: add test cases for empty value and no value config variables.
cvsimport: have default merge regex also match beginning of commit message
git clone -s documentation: force a new paragraph for the NOTE
status: suggest "git rm --cached" to unstage for initial commit
Protect get_author_ident_from_commit() from filenames in work tree
upload-pack: Initialize the exec-path.
bisect: use verbatim commit subject in the bisect log
git-cvsimport.txt: fix '-M' description.
Revert "pack-objects: only throw away data during memory pressure"
Diffstat (limited to 't')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 22 | ||||
-rwxr-xr-x | t/t7502-status.sh | 11 |
2 files changed, 32 insertions, 1 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index e33ea4e9f4..e5ed74545b 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -340,4 +340,26 @@ test_expect_success 'rebase a commit violating pre-commit' ' ' +test_expect_success 'rebase with a file named HEAD in worktree' ' + + rm -fr .git/hooks && + git reset --hard && + git checkout -b branch3 A && + + ( + GIT_AUTHOR_NAME="Squashed Away" && + export GIT_AUTHOR_NAME && + >HEAD && + git add HEAD && + git commit -m "Add head" && + >BODY && + git add BODY && + git commit -m "Add body" + ) && + + FAKE_LINES="1 squash 2" git rebase -i to-be-rebased && + test "$(git show -s --pretty=format:%an)" = "Squashed Away" + +' + test_done diff --git a/t/t7502-status.sh b/t/t7502-status.sh index 9ce50cade8..b64ce30ff1 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -17,6 +17,9 @@ test_expect_success 'setup' ' : > dir1/tracked && : > dir1/modified && git add . && + + git status >output && + test_tick && git commit -m initial && : > untracked && @@ -28,6 +31,12 @@ test_expect_success 'setup' ' git add dir2/added ' +test_expect_success 'status (1)' ' + + grep -e "use \"git rm --cached <file>\.\.\.\" to unstage" output + +' + cat > expect << \EOF # On branch master # Changes to be committed: @@ -51,7 +60,7 @@ cat > expect << \EOF # untracked EOF -test_expect_success 'status' ' +test_expect_success 'status (2)' ' git status > output && git diff expect output |