diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-02-23 13:30:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-23 13:30:10 -0800 |
commit | 883a2a35043ca4eb238c92e94a66bd04a1fb833a (patch) | |
tree | d331ee33718e44828a4e1f50dd241ef5b7e6fd38 /t | |
parent | Merge branch 'js/configure-libintl' (diff) | |
parent | refresh_index: do not show unmerged path that is outside pathspec (diff) | |
download | tgif-883a2a35043ca4eb238c92e94a66bd04a1fb833a.tar.xz |
Merge branch 'jc/add-refresh-unmerged'
* jc/add-refresh-unmerged:
refresh_index: do not show unmerged path that is outside pathspec
Diffstat (limited to 't')
-rwxr-xr-x | t/t3700-add.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 575d9508a0..874b3a6444 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -179,6 +179,21 @@ test_expect_success 'git add --refresh' ' test -z "`git diff-index HEAD -- foo`" ' +test_expect_success 'git add --refresh with pathspec' ' + git reset --hard && + echo >foo && echo >bar && echo >baz && + git add foo bar baz && H=$(git rev-parse :foo) && git rm -f foo && + echo "100644 $H 3 foo" | git update-index --index-info && + test-chmtime -60 bar baz && + >expect && + git add --refresh bar >actual && + test_cmp expect actual && + + git diff-files --name-only >actual && + ! grep bar actual&& + grep baz actual +' + test_expect_success POSIXPERM,SANITY 'git add should fail atomically upon an unreadable file' ' git reset --hard && date >foo1 && |