diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-16 00:06:37 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-16 00:06:41 +0100 |
commit | 0c823e018f9092bb9d04cb0905970e02a23ea040 (patch) | |
tree | 99516b3caf0f27dfcddc5f28f449aca0b5d72a3c /tests | |
parent | 92e02c105c5b673502689ff4785ef54002b49a1b (diff) |
Test suite: Do not fail when git requires --allow-unrelated-histories.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -764,6 +764,18 @@ t-gbp-unapplied-pq2qc () { git commit -m 'Commit patch queue' } +t-git-pseudo-merge () { + # like git merge -s ours + if [ ! "$git_pseuomerge_opts" ]; then + if git merge --help \ + | grep -q allow-unrelated-histories; then + git_pseuomerge_opts='--allow-unrelated-histories' + fi + git_pseuomerge_opts+=' -s ours' + fi + git merge $git_pseuomerge_opts "$@" +} + t-gbp-example-prep () { t-tstunt-parsechangelog t-archive example 1.0-1 @@ -785,7 +797,7 @@ t-gbp-example-prep () { t-commit 'some updates' 1.0-2 - git merge -s ours \ + t-git-pseudo-merge \ -m 'Pseudo-merge to make descendant of archive' \ remotes/dgit/dgit/sid } |