summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Taylor Blau <me@ttaylorr.com>2021-01-25 18:37:30 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-25 18:32:43 -0800
commitc97733435aae270bbef9bd4d179edca678774375 (patch)
treebd4654fd79d6c754db87133c598fd32051114677 /t
parentbuiltin/index-pack.c: write reverse indexes (diff)
downloadtgif-c97733435aae270bbef9bd4d179edca678774375.tar.xz
builtin/pack-objects.c: respect 'pack.writeReverseIndex'
Now that we have an implementation that can write the new reverse index format, enable writing a .rev file in 'git pack-objects' by consulting the pack.writeReverseIndex configuration variable. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t5325-reverse-index.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5325-reverse-index.sh b/t/t5325-reverse-index.sh
index 2dae213126..87040263b7 100755
--- a/t/t5325-reverse-index.sh
+++ b/t/t5325-reverse-index.sh
@@ -68,4 +68,17 @@ test_expect_success 'index-pack infers reverse index name with -o' '
test_path_is_file other.rev
'
+test_expect_success 'pack-objects respects pack.writeReverseIndex' '
+ test_when_finished "rm -fr pack-1-*" &&
+
+ git -c pack.writeReverseIndex= pack-objects --all pack-1 &&
+ test_path_is_missing pack-1-*.rev &&
+
+ git -c pack.writeReverseIndex=false pack-objects --all pack-1 &&
+ test_path_is_missing pack-1-*.rev &&
+
+ git -c pack.writeReverseIndex=true pack-objects --all pack-1 &&
+ test_path_is_file pack-1-*.rev
+'
+
test_done