summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-02-13 22:33:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-13 22:33:19 (GMT)
commitaa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d (patch)
tree8e9410d69333688d32ccab097beaa48b10850833 /t
parent41e2edf41a6d501f1b8beca7f1f0bcbe9296dcc2 (diff)
parentd8e87570c32b190af3991d180f37adb8cf5eb99c (diff)
downloadgit-aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d.zip
git-aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d.tar.gz
git-aa8d53ec387a7baf72ab5e3a91c35bb5bf20eb4d.tar.bz2
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-xt/t3404-rebase-interactive.sh22
-rwxr-xr-xt/t7502-status.sh11
2 files changed, 32 insertions, 1 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index e33ea4e..e5ed745 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 9ce50ca..b64ce30 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