summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-07 00:59:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-07 00:59:56 (GMT)
commit0efa3d74e705ed2c66c33854ac4bfd0d6c7f56de (patch)
treeef2634edad53b83fd6aea32a325da6a03d821149 /t
parentebf846c0086114714c0162c4dc8acbf344740c1d (diff)
parent6e37c8ed3c899385651f5beac1f1588fe3c1f5fb (diff)
downloadgit-0efa3d74e705ed2c66c33854ac4bfd0d6c7f56de.zip
git-0efa3d74e705ed2c66c33854ac4bfd0d6c7f56de.tar.gz
git-0efa3d74e705ed2c66c33854ac4bfd0d6c7f56de.tar.bz2
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 4667e1a..4f2f84f 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