trap 'test $? = 0 || t-report-failure' EXIT
+t-filter-out-git-hyphen-dir
+
t-set-intree
: ${DGIT_TEST_DEBUG=-D}
local var=$1
local tstunt=$2
eval '
- case "'$var'" in
+ case "$'$var'" in
"$tstunt:"*) ;;
*":$tstunt:"*) ;;
+ "") '$var'="$tstunt" ;;
*) '$var'="$tstunt:$'$var'" ;;
esac
+ export '$var'
'
}
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
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
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
}