From: Ian Jackson Date: Mon, 7 Nov 2016 02:51:23 +0000 (+0000) Subject: dgit: Move canonicalise_suite into fetch() X-Git-Tag: archive/debian/2.10~27 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d5f5e01951b405c645ee8c1aa497b0c6893e9da1;p=dgit.git dgit: Move canonicalise_suite into fetch() fetchpullargs has to run before we have dealt with multisuites, which cannot be straightforwardly canonicalised. Move the canonicalisation out of fetchpullargs. Previously, fetchpullargs would always call canonicalise_suite if it wasn't going to fail. In one of the cases it would print a message, but we have just changed canonicalise_suite to print a message too, so the one from fetchpullargs was redundant. fetchpullargs is called right before fetch, in cmd_fetch; and, in cmd_pull. In cmd_pull the split brain check intervenes between fetchpullargs and pull which calls fetch. So overall there is now no functional change other than the loss of the now-redundant message. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index 5056e11d..9a28d81d 100755 --- a/dgit +++ b/dgit @@ -3119,6 +3119,7 @@ sub clone ($) { } sub fetch () { + canonicalise_suite(); if (check_for_git()) { git_fetch_us(); } @@ -3902,11 +3903,8 @@ sub fetchpullargs () { my $clogp = parsechangelog(); $isuite = getfield $clogp, 'Distribution'; } - canonicalise_suite(); - progress "fetching from suite $csuite"; } elsif (@ARGV==1) { ($isuite) = @ARGV; - canonicalise_suite(); } else { badusage "incorrect arguments to dgit fetch or dgit pull"; }