From 92e3078f04dd4204962a38e3875a50cfc4fd23ce Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 28 Aug 2013 23:36:54 +0100 Subject: [PATCH] Fix some bugs in dgit fetch --dry-run which made dgit push --dry-run often not work at all. --- debian/changelog | 2 ++ dgit | 5 ++--- dgit.1 | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6d3d7834..cbc2dd4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ dgit (0.13) unstable; urgency=low * When uploading to Debian, tell dput to upload to "ftp-master". This avoids problems with derivatives whose dput has a different default. Closes: #720958. + * Fix some bugs in dgit fetch --dry-run which made dgit push + --dry-run often not work at all. -- diff --git a/dgit b/dgit index 35c02afc..0a599b0d 100755 --- a/dgit +++ b/dgit @@ -680,8 +680,7 @@ sub is_fast_fwd ($$) { } sub git_fetch_us () { - badusage "cannot dry run with fetch" if $dryrun; - runcmd @git, qw(fetch),access_giturl(),fetchspec(); + runcmd_ordryrun @git, qw(fetch),access_giturl(),fetchspec(); } sub fetch_from_archive () { @@ -768,7 +767,7 @@ sub clone ($) { if (check_for_git()) { print "fetching existing git history\n"; git_fetch_us(); - runcmd @git, qw(fetch origin); + runcmd_ordryrun @git, qw(fetch origin); } else { print "starting new git history\n"; } diff --git a/dgit.1 b/dgit.1 index f97e458f..86f19b49 100644 --- a/dgit.1 +++ b/dgit.1 @@ -565,5 +565,6 @@ sane way to find the path in the archive pool of the .dsc for a particular suite. I'm assured that the archive layout is a `well known algorithm' by now. ---dry-run often does not work with fetch, even though this is a -logically plausible request. (It fails, instead.) +--dry-run does not always work properly, as not doing some of the git +fetches may result in subsequent actions being different. Doing a +non-dry-run dgit fetch first will help. -- 2.30.2