X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7508-status.sh;h=a9df7ff7bd0efd987a83f180122873996d866436;hb=921296d3dabcb0bfe0926a1590cc9f7be42ae3e9;hp=556d0faa77e027c8a18e213088fa6bbc5d7e7af5;hpb=a886ba2801cbe0a4d6bbc34714cb09996dbcc127;p=git.git diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 556d0faa7..a9df7ff7b 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -496,6 +496,16 @@ test_expect_success 'dry-run of partial commit excluding new file in index' ' test_cmp expect output ' +cat >expect <output && + test_cmp expect output +' + test_expect_success 'setup status submodule summary' ' test_create_repo sm && ( cd sm && @@ -693,4 +703,19 @@ test_expect_success 'commit --dry-run submodule summary (--amend)' ' test_cmp expect output ' +test_expect_success POSIXPERM 'status succeeds in a read-only repository' ' + ( + chmod a-w .git && + # make dir1/tracked stat-dirty + >dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked && + git status -s >output && + ! grep dir1/tracked output && + # make sure "status" succeeded without writing index out + git diff-files | grep dir1/tracked + ) + status=$? + chmod 775 .git + (exit $status) +' + test_done