diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-05-05 14:54:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-05-05 14:54:28 -0700 |
| commit | 1d7e9c4c4e60375146ad70ed5c555574a653e92a (patch) | |
| tree | a7feeb931a91fcb166a508f495f125208ee90155 /t/t5324-split-commit-graph.sh | |
| parent | b75dc16ae3aa325941d64a3d0cfc1690a164786a (diff) | |
| parent | 45a4365cb610adce1c37c099da7d18619725ce4f (diff) | |
| download | git-1d7e9c4c4e60375146ad70ed5c555574a653e92a.tar.gz | |
Merge branch 'tb/commit-graph-perm-bits'
Some of the files commit-graph subsystem keeps on disk did not
correctly honor the core.sharedRepository settings and some were
left read-write.
* tb/commit-graph-perm-bits:
commit-graph.c: make 'commit-graph-chain's read-only
commit-graph.c: ensure graph layers respect core.sharedRepository
commit-graph.c: write non-split graphs as read-only
lockfile.c: introduce 'hold_lock_file_for_update_mode'
tempfile.c: introduce 'create_tempfile_mode'
Diffstat (limited to 't/t5324-split-commit-graph.sh')
| -rwxr-xr-x | t/t5324-split-commit-graph.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh index 594edb7307..269d0964a3 100755 --- a/t/t5324-split-commit-graph.sh +++ b/t/t5324-split-commit-graph.sh @@ -37,6 +37,10 @@ graph_read_expect() { test_cmp expect output } +test_expect_success POSIXPERM 'tweak umask for modebit tests' ' + umask 022 +' + test_expect_success 'create commits and write commit-graph' ' for i in $(test_seq 3) do @@ -401,4 +405,24 @@ test_expect_success ULIMIT_FILE_DESCRIPTORS 'handles file descriptor exhaustion' ) ' +while read mode modebits +do + test_expect_success POSIXPERM "split commit-graph respects core.sharedrepository $mode" ' + rm -rf $graphdir $infodir/commit-graph && + git reset --hard commits/1 && + test_config core.sharedrepository "$mode" && + git commit-graph write --split --reachable && + ls $graphdir/graph-*.graph >graph-files && + test_line_count = 1 graph-files && + echo "$modebits" >expect && + test_modebits $graphdir/graph-*.graph >actual && + test_cmp expect actual && + test_modebits $graphdir/commit-graph-chain >actual && + test_cmp expect actual + ' +done <<\EOF +0666 -r--r--r-- +0600 -r-------- +EOF + test_done |
