Merge branch 'jr/grep-en-config'
[gitweb.git] / t / t7501-commit.sh
index 7940901d47fd457cda77ee333aa40145433be4d4..a76c47419590ed16c53b8d4d82c2d92c11853154 100755 (executable)
@@ -14,8 +14,11 @@ test_tick
 test_expect_success \
        "initial status" \
        "echo 'bongo bongo' >file &&
-        git add file && \
-        git status | grep 'Initial commit'"
+        git add file"
+
+test_expect_success C_LOCALE_OUTPUT \
+       "Constructing initial commit" \
+       "git status | grep 'Initial commit'"
 
 test_expect_success \
        "fail initial amend" \
@@ -230,6 +233,10 @@ test_expect_success 'amend commit to fix date' '
 
 '
 
+test_expect_success 'commit complains about bogus date' '
+       test_must_fail git commit --amend --date=10.11.2010
+'
+
 test_expect_success 'sign off (1)' '
 
        echo 1 >positive &&
@@ -425,4 +432,16 @@ test_expect_success 'amend using the message from a commit named with tag' '
 
 '
 
+test_expect_success 'amend can copy notes' '
+
+       git config notes.rewrite.amend true &&
+       git config notes.rewriteRef "refs/notes/*" &&
+       test_commit foo &&
+       git notes add -m"a note" &&
+       test_tick &&
+       git commit --amend -m"new foo" &&
+       test "$(git notes show)" = "a note"
+
+'
+
 test_done