summaryrefslogtreecommitdiff
path: root/t/t5324-split-commit-graph.sh
diff options
context:
space:
mode:
authorLibravatar Taylor Blau <me@ttaylorr.com>2020-04-29 11:36:46 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-29 12:35:30 -0700
commit45a4365cb610adce1c37c099da7d18619725ce4f (patch)
tree9e85404e6e5dfe3c663c856a3fb06453e6b2fa45 /t/t5324-split-commit-graph.sh
parentcommit-graph.c: ensure graph layers respect core.sharedRepository (diff)
downloadtgif-45a4365cb610adce1c37c099da7d18619725ce4f.tar.xz
commit-graph.c: make 'commit-graph-chain's read-only
In a previous commit, we made incremental graph layers read-only by using 'git_mkstemp_mode' with permissions '0444'. There is no reason that 'commit-graph-chain's should be modifiable by the user, since they are generated at a temporary location and then atomically renamed into place. To ensure that these files are read-only, too, use 'hold_lock_file_for_update_mode' with the same read-only permission bits, and let the umask and 'adjust_shared_perm' take care of the rest. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5324-split-commit-graph.sh')
-rwxr-xr-xt/t5324-split-commit-graph.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
index 699c23d077..cff5a41f48 100755
--- a/t/t5324-split-commit-graph.sh
+++ b/t/t5324-split-commit-graph.sh
@@ -366,6 +366,8 @@ do
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