]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t3701-add-interactive.sh
Merge branch 'jn/editor-pager'
[git.git] / t / t3701-add-interactive.sh
index aa5909b14c822227bc8d9e7f2425b35458c9be03..d86bc81abfd954194c245e7e180a23f2b9b7c840 100755 (executable)
@@ -138,6 +138,20 @@ test_expect_success 'real edit works' '
        test_cmp expected output
 '
 
+test_expect_success 'skip files similarly as commit -a' '
+       git reset &&
+       echo file >.gitignore &&
+       echo changed >file &&
+       echo y | git add -p file &&
+       git diff >output &&
+       git reset &&
+       git commit -am commit &&
+       git diff >expected &&
+       test_cmp expected output &&
+       git reset --hard HEAD^
+'
+rm -f .gitignore
+
 if test "$(git config --bool core.filemode)" = false
 then
        say 'skipping filemode tests (filesystem does not properly support modes)'