Have verified with this:
diff --git a/tests/tests/gdr-viagit b/tests/tests/gdr-viagit
index
55fe4d74..
20576c23 100755
--- a/tests/tests/gdr-viagit
+++ b/tests/tests/gdr-viagit
@@ -17,6 +17,7 @@ git-debrebase) ;;
cat <<'END' >$st
#!/bin/sh
set -x
+export GIT_DIR=$PWD/`git-rev-parse --git-dir`
exec "$DGIT_GITDEBREBASE_TEST_REAL" "$@"
END
chmod +x $st
that this would indeed spot at least some problems.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin
Restrictions: x-dgit-intree-only x-dgit-git-only
Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin
Restrictions: x-dgit-intree-only x-dgit-git-only
-Tests: gdr-edits gdr-import-dgit
+Tests: gdr-edits gdr-import-dgit gdr-viagit
Tests-Directory: tests/tests
Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
Tests-Directory: tests/tests
Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, git-buildpackage, libfile-fnmatch-perl, faketime
--- /dev/null
+#!/bin/bash
+set -e
+. tests/lib
+
+t-dependencies git-buildpackage libfile-fnmatch-perl faketime
+
+t-setup-import gdr-convert-gbp
+
+: '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-some-changes
+
+t-git-debrebase
+t-gdr-good laundered
+
+t-git-debrebase stitch --prose=wombat
+t-gdr-good stitched
+
+t-ok