diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-08 14:29:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-08 14:29:11 -0700 |
commit | d04aa7ec4738f90220b9e205326f17938b8f89d4 (patch) | |
tree | 7be435da616d58dec183f8c6c8f1517819a2a626 /t/t9400-git-cvsserver-server.sh | |
parent | 72d917a7f9a5123ef7c0d6db306bbc0d385227e2 (diff) | |
parent | e379fdf34fee96cd205be83ff4e71699bdc32b18 (diff) | |
download | git-d04aa7ec4738f90220b9e205326f17938b8f89d4.tar.gz |
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/t9400-git-cvsserver-server.sh')
-rwxr-xr-x | t/t9400-git-cvsserver-server.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index d708cbf032..432c61d246 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -45,7 +45,8 @@ test_expect_success 'setup' ' touch secondrootfile && git add secondrootfile && git commit -m "second root") && - git pull secondroot master && + git fetch secondroot master && + git merge --allow-unrelated-histories FETCH_HEAD && git clone -q --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 && GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true && GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" && |