summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-03-07 09:59:56 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-03-07 09:59:56 +0900
commit0efa3d74e705ed2c66c33854ac4bfd0d6c7f56de (patch)
treeef2634edad53b83fd6aea32a325da6a03d821149 /t
parentMerge branch 'rj/prune-packed-excess-args' (diff)
parentread-cache.c: fix writing "link" index ext with null base oid (diff)
downloadtgif-0efa3d74e705ed2c66c33854ac4bfd0d6c7f56de.tar.xz
Merge branch 'nd/split-index-null-base-fix'
Split-index fix. * nd/split-index-null-base-fix: read-cache.c: fix writing "link" index ext with null base oid
Diffstat (limited to 't')
-rwxr-xr-xt/t1700-split-index.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 4667e1a190..4f2f84f309 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -472,4 +472,22 @@ test_expect_success 'writing split index with null sha1 does not write cache tre
test_line_count = 0 cache-tree.out
'
+test_expect_success 'do not refresh null base index' '
+ test_create_repo merge &&
+ (
+ cd merge &&
+ test_commit initial &&
+ git checkout -b side-branch &&
+ test_commit extra &&
+ git checkout master &&
+ git update-index --split-index &&
+ test_commit more &&
+ # must not write a new shareindex, or we wont catch the problem
+ git -c splitIndex.maxPercentChange=100 merge --no-edit side-branch 2>err &&
+ # i.e. do not expect warnings like
+ # could not freshen shared index .../shareindex.00000...
+ test_must_be_empty err
+ )
+'
+
test_done