X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib;h=3ddb98051e85890572809e56172575275433e13f;hb=70dbab26df688289afccf257188267afb3594d16;hp=3294cdc0faa62924daa92d7f853a97fb41fd56f8;hpb=523f42f6ba9805aae8245af4f996581d6c7c51a3;p=dgit.git diff --git a/tests/lib b/tests/lib index 3294cdc0..3ddb9805 100644 --- a/tests/lib +++ b/tests/lib @@ -21,6 +21,8 @@ END trap 'test $? = 0 || t-report-failure' EXIT +t-filter-out-git-hyphen-dir + t-set-intree : ${DGIT_TEST_DEBUG=-D} @@ -764,7 +766,19 @@ t-gbp-unapplied-pq2qc () { git commit -m 'Commit patch queue' } -t-gbp-example-prep () { +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-no-ff () { t-tstunt-parsechangelog t-archive example 1.0-1 t-git-none @@ -774,7 +788,7 @@ t-gbp-example-prep () { t-dgit fetch - git-checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip + git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip gbp pq rebase echo '/* some comment */' >>src.c @@ -784,8 +798,12 @@ t-gbp-example-prep () { t-gbp-unapplied-pq2qc t-commit 'some updates' 1.0-2 +} + +t-gbp-example-prep () { + t-gbp-example-prep-no-ff - git merge -s ours \ + t-git-pseudo-merge \ -m 'Pseudo-merge to make descendant of archive' \ remotes/dgit/dgit/sid }