diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2016-06-16 15:21:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-24 18:16:13 (GMT) |
commit | dcb2e39fda75ef20b950fe293bbc989e95adbdec (patch) | |
tree | 9482a7b7b148334af90b453115c58956d44e2e71 /Utilities/Scripts | |
parent | 86f1d70445f8a192fbc518cac83e0d6e8db70eef (diff) | |
download | CMake-dcb2e39fda75ef20b950fe293bbc989e95adbdec.zip CMake-dcb2e39fda75ef20b950fe293bbc989e95adbdec.tar.gz CMake-dcb2e39fda75ef20b950fe293bbc989e95adbdec.tar.bz2 |
update-third-party: support Git 2.9.0's new merge restrictions
Use the `--allow-unrelated-histories` flag to declare that we Know What
We're Doing™ (but only if necessary).
Diffstat (limited to 'Utilities/Scripts')
-rw-r--r-- | Utilities/Scripts/update-third-party.bash | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash index 6aeeccd..3b8358e 100644 --- a/Utilities/Scripts/update-third-party.bash +++ b/Utilities/Scripts/update-third-party.bash @@ -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 |