Merge topic 'update-third-party-git-2.9'

dcb2e39f update-third-party: support Git 2.9.0's new merge restrictions
This commit is contained in:
Brad King 2016-08-24 14:23:56 -04:00 committed by CMake Topic Stage
commit 81c3e637cc
1 changed files with 7 additions and 1 deletions

View File

@ -155,8 +155,14 @@ popd
if [ -n "$basehash" ]; then
git merge --log -s recursive "-Xsubtree=$subtree/" --no-commit "upstream-$name"
else
unrelated_histories_flag=""
if git merge --help | grep -q -e allow-unrelated-histories; then
unrelated_histories_flag="--allow-unrelated-histories "
fi
readonly unrelated_histories_flag
git fetch "$extractdir" "upstream-$name:upstream-$name"
git merge --log -s ours --no-commit "upstream-$name"
git merge --log -s ours --no-commit $unrelated_histories_flag "upstream-$name"
git read-tree -u --prefix="$subtree/" "upstream-$name"
fi
git commit --no-edit