diff options
Diffstat (limited to 'tests/tests/gdr-merge')
-rwxr-xr-x | tests/tests/gdr-merge | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/tests/gdr-merge b/tests/tests/gdr-merge new file mode 100755 index 0000000..7a6ffdb --- /dev/null +++ b/tests/tests/gdr-merge @@ -0,0 +1,70 @@ +#!/bin/bash +set -e +autoimport= +. tests/lib + +t-dependencies NO-DGIT GDR + +t-tstunt-parsechangelog +t-setup-import gdr-convert-gbp-noarchive + +: 'set up so t-git-debrebase runs gdr via git' + +case "$DGIT_GITDEBREBASE_TEST" in +''|git-debrebase) ;; +*) + t-tstunt + st=$tmp/tstunt/git-debrebase + export DGIT_GITDEBREBASE_TEST_REAL="$DGIT_GITDEBREBASE_TEST" + cat <<'END' >$st +#!/bin/sh +set -x +exec "$DGIT_GITDEBREBASE_TEST_REAL" "$@" +END + chmod +x $st + ;; +esac + +DGIT_GITDEBREBASE_TEST='git debrebase' + +: 'do a simple test' + +cd $p + +t-gdr-prep-new-upstream 2.1 +git tag v2.1 upstream + +t-some-changes before +t-git-debrebase quick + +git checkout -b other +t-some-changes other '' -other + +git checkout master +t-some-changes us-1 '' -us +t-git-debrebase new-upstream 2.1 +t-some-changes us-2 '' -us +t-git-debrebase quick + +git merge other + +t-some-changes after +# xxx ^ commenting out this line produces an internal error + +t-expect-fail E:'general two-parent merge' \ +t-git-debrebase + +export GIT_DEBREBASE_EXPERIMENTAL_MERGE=1 + +t-git-debrebase + +# xxx want to check that we DTRT if we start out unstitched - +# xxx should consider our ffq-prev as a parent +# xxx or should we ? it's not a parent of the merge is it ? +# xxx => user should prefer to make merges when stitched ? +# xxx think about this later + +# t-gdr-good laundered +# xxx ^ this does not work + +t-ok |