aboutsummaryrefslogtreecommitdiff
path: root/t/t5500-fetch-pack.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-08 14:29:11 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-08 14:29:11 -0700
commitd04aa7ec4738f90220b9e205326f17938b8f89d4 (patch)
tree7be435da616d58dec183f8c6c8f1517819a2a626 /t/t5500-fetch-pack.sh
parent72d917a7f9a5123ef7c0d6db306bbc0d385227e2 (diff)
parente379fdf34fee96cd205be83ff4e71699bdc32b18 (diff)
downloadgit-d04aa7ec4738f90220b9e205326f17938b8f89d4.tar.gz
git-d04aa7ec4738f90220b9e205326f17938b8f89d4.tar.xz
Merge branch 'jc/merge-refuse-new-root'
"git merge" used to allow merging two branches that have no common base by default, which led to a brand new history of an existing project created and then get pulled by an unsuspecting maintainer, which allowed an unnecessary parallel history merged into the existing project. The command has been taught not to allow this by default, with an escape hatch "--allow-unrelated-histories" option to be used in a rare event that merges histories of two projects that started their lives independently. * jc/merge-refuse-new-root: merge: refuse to create too cool a merge by default
Diffstat (limited to 't/t5500-fetch-pack.sh')
-rwxr-xr-xt/t5500-fetch-pack.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 9b9bec468..91a69fc33 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -259,7 +259,8 @@ test_expect_success 'clone shallow object count' '
test_expect_success 'pull in shallow repo with missing merge base' '
(
cd shallow &&
- test_must_fail git pull --depth 4 .. A
+ git fetch --depth 4 .. A
+ test_must_fail git merge --allow-unrelated-histories FETCH_HEAD
)
'
@@ -279,9 +280,10 @@ test_expect_success 'clone shallow depth count' '
test_expect_success 'clone shallow object count' '
(
cd shallow &&
+ git prune &&
git count-objects -v
) > count.shallow &&
- grep "^count: 55" count.shallow
+ grep "^count: 54" count.shallow
'
test_expect_success 'fetch --no-shallow on full repo' '