chiark / gitweb /
dgit: Provide --for-push option
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 23 Jul 2019 15:03:13 +0000 (16:03 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 23 Jul 2019 15:03:13 +0000 (16:03 +0100)
This is much more conveient and in some cases sensible than
 -cdgit-distro.DISTRO.readonly=0

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit
dgit.1

diff --git a/dgit b/dgit
index 924428cb9454a49faa8ce3e72c11d19057d88b12..ca6fe56ab840fe9342f6a1235904a3ac3ee1fc66 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -7604,6 +7604,9 @@ sub parseopts () {
                    f_ "%s: warning: ignoring unknown force option %s\n",
                       $us, $_;
                $_='';
+           } elsif (m/^--for-push$/s) {
+               push @ropts, $_;
+               $access_forpush = 1;
            } elsif (m/^--config-lookup-explode=(.+)$/s) {
                # undocumented, for testing
                push @ropts, $_;
diff --git a/dgit.1 b/dgit.1
index f099ed0f373327816bb64662ee023e5be05acb40..a3c2549d3f6757320d34775f0737077e5fe84542 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -1327,6 +1327,12 @@ Force on or off the use of the absurd git-apply emulation
 when running gbp pq import
 when importing a package from a .dsc.
 See Debian bug #841867.
+.TP
+.BR \-\-for\-push
+Override the dgit-distro.distro.readonly configuration setting,
+to specify that we have read/write access
+and should use the corresponding git and achive access approach
+even if the operation is a read-only one.
 .SH CONFIGURATION
 dgit can be configured via the git config system.
 You may set keys with git-config (either in system-global or per-tree