X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3700-add.sh;h=a328bf57eb67fd96a88020f02948d380ec699496;hb=a108e5386122c75a350e9a191fc727895941ddff;hp=213e9249daa5be824f8b6e1efbc754e39f67bde7;hpb=04d70bebe72c264a1c4d26cbe306672e3e4098e3;p=git.git diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 213e9249d..a328bf57e 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -143,4 +143,16 @@ test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over st git ls-files --stage | grep "^120000 .* 0 symlink$" ' +test_expect_success 'git add --refresh' ' + >foo && git add foo && git commit -a -m "commit all" && + test -z "`git diff-index HEAD -- foo`" && + git read-tree HEAD && + case "`git diff-index HEAD -- foo`" in + :100644" "*"M foo") echo ok;; + *) echo fail; (exit 1);; + esac && + git add --refresh -- foo && + test -z "`git diff-index HEAD -- foo`" +' + test_done