chiark / gitweb /
dry run fetch really does not update ref
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 16 Aug 2013 14:01:12 +0000 (15:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 16 Aug 2013 14:01:12 +0000 (15:01 +0100)
TODO
dgit
dgit.1

diff --git a/TODO b/TODO
index 495b7a9c4ae79017141bf2169ef36a3751aec329..c82759d19573d42d48be42a7cb1070991a2b8e42 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-abolish fetch dry run
-
 config for repo locations
 
 push should push to dgit remote (other branches)
diff --git a/dgit b/dgit
index 0fb928906f06833c553a8d7fc2c9b47d64f484cc..d160e185d21910546fa395af642a2c91c032d76a 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -346,7 +346,8 @@ sub is_fast_fwd ($$) {
 }
 
 sub git_fetch_us () {
-    runcmd_ordryrun @git, qw(fetch),$remotename,fetchspec();
+    die "cannot dry run with fetch" if $dryrun;
+    runcmd @git, qw(fetch),$remotename,fetchspec();
 }
 
 sub fetch_from_archive () {
diff --git a/dgit.1 b/dgit.1
index 4cb9f45c5cb507469cc694e076f3ff21d5a9ffbc..3bc270c7acb2d6f909186df66bf299d7857f19ff 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -95,9 +95,7 @@ the remote tracking branch for dgit/suite.
 .TP
 .BR --dry-run | -n
 Go through the motions, fetching all information needed, but do not
-actually update the output(s).  For fetch and pull, dgit determines
-which git commit corresponds to the archive but does not update
-remotes/dgit/dgit/suite or do any merge.  For push, dgit does
+actually update the output(s).  For push, dgit does
 the required checks and leaves the new .dsc in a temporary file,
 but does not sign, tag, push or upload.
 .TP
@@ -167,3 +165,6 @@ The error messages are often unhelpfully terse and tend to refer to
 line numbers in dgit.
 
 The option parser requires values to be cuddled to the option name.
+
+--dry-run often does not work with fetch, even though this is a
+logically plausible request.  (It fails, instead.)