From 2b11580e5274e1919fd21da4d0fa2dd19b2c0fea Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 16 Aug 2013 15:01:12 +0100 Subject: [PATCH] dry run fetch really does not update ref --- TODO | 2 -- dgit | 3 ++- dgit.1 | 7 ++++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 495b7a9c..c82759d1 100644 --- 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 0fb92890..d160e185 100755 --- 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 4cb9f45c..3bc270c7 100644 --- 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.) -- 2.30.2