chiark / gitweb /
git-debrebase: Support --dgit option for finding dgit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 10:18:29 +0000 (11:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Aug 2018 10:20:45 +0000 (11:20 +0100)
Nothing uses this yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase
git-debrebase.1.pod
tests/lib-gdr

index eb0acb21c0ab0df27204c1afdd04437ad8d83835..b51c7148e53f663251372c145953a884c2b736a1 100755 (executable)
@@ -114,6 +114,7 @@ our $rd;
 our $workarea;
 
 our @git = qw(git);
+our @dgit = qw(dgit);
 
 sub in_workarea ($) {
     my ($sub) = @_;
@@ -1842,6 +1843,7 @@ getoptions_main
           'noop-ok', => \$opt_noop_ok,
           'f=s' => \@snag_force_opts,
           'anchor=s' => \@opt_anchors,
+          '--dgit=s' => \($dgit[0]),
           'force!',
           '-i:s' => sub {
               my ($opt,$val) = @_;
index db22fa5d5023baad3e6ec5198de6913e53ce8eba..eb85c6c4f5e78b068a4bb7a4002f6b91cf88cf8b 100644 (file)
@@ -407,6 +407,12 @@ it is a snag if <commit-ish> is the anchor
 for the previous upstream version in
 git-debrebase new-upstream operations.
 
+=item --dgit=<program>
+
+Run <program>, instead of dgit from PATH,
+when invocation of dgit is necessary.
+This is provided mostly for the benefit of the test suite.
+
 =item -D
 
 Requests (more) debugging.  May be repeated.
index 95d2330e17a60386b59ebd999a4f3703d5112bbb..7b43d4f2d7a42179483c16e6be9af07dc32992f1 100644 (file)
@@ -7,7 +7,7 @@ t-git-debrebase () {
        local gdr=${DGIT_GITDEBREBASE_TEST-git-debrebase}
        : '
 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
-       $gdr    $GDR_TEST_OPTS $GDR_TEST_DEBUG $t_gdr_xopts "$@"
+       $gdr --dgit=$DGIT_TEST $GDR_TEST_OPTS $GDR_TEST_DEBUG $t_gdr_xopts "$@"
        : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
 '
 }