diff options
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | tests/lib | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index fc7d222..aceac20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -121,6 +121,7 @@ dgit (1.5~~) unstable; urgency=medium * tstunt arrangements: Fix mishandling of PERLLIB, etc. * tstunt-parsechangelog: Produce Timestamp field (like official one does, now). + * Do not fail when git requires --allow-unrelated-histories. -- @@ -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 } |