Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-03 00:17:39 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-03 00:17:39 +0300
commit307a53dd9914f65c9b6399221574e24234e4b49f (patch)
tree9fd3400f4a8f3f0782a8803a83f0f076844237ac /t/t5324-split-commit-graph.sh
parentd5c2d1a0aad8ef59c83d801e6cf378dc8b312f8b (diff)
parent85102ac71b98466eaa2b9b5a568c3a1de736202d (diff)
Merge branch 'ds/commit-graph-merging-fix'
When "git commit-graph" detects the same commit recorded more than once while it is merging the layers, it used to die. The code now ignores all but one of them and continues. * ds/commit-graph-merging-fix: commit-graph: don't write commit-graph when disabled commit-graph: ignore duplicates when merging layers
Diffstat (limited to 't/t5324-split-commit-graph.sh')
-rwxr-xr-xt/t5324-split-commit-graph.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5324-split-commit-graph.sh b/t/t5324-split-commit-graph.sh
index c334ee9155..4d3842b83b 100755
--- a/t/t5324-split-commit-graph.sh
+++ b/t/t5324-split-commit-graph.sh
@@ -440,4 +440,17 @@ test_expect_success '--split=replace with partial Bloom data' '
verify_chain_files_exist $graphdir
'
+test_expect_success 'prevent regression for duplicate commits across layers' '
+ git init dup &&
+ git -C dup commit --allow-empty -m one &&
+ git -C dup -c core.commitGraph=false commit-graph write --split=no-merge --reachable 2>err &&
+ test_i18ngrep "attempting to write a commit-graph" err &&
+ git -C dup commit-graph write --split=no-merge --reachable &&
+ git -C dup commit --allow-empty -m two &&
+ git -C dup commit-graph write --split=no-merge --reachable &&
+ git -C dup commit --allow-empty -m three &&
+ git -C dup commit-graph write --split --reachable &&
+ git -C dup commit-graph verify
+'
+
test_done