chiark / gitweb /
dgit: Move canonicalise_suite into fetch()
[dgit.git] / dgit
diff --git a/dgit b/dgit
index f1a30c3a989a46748b770c070a040df654d9d94c..9a28d81d75387edfcef84207c680817367ea0b2a 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3090,8 +3090,8 @@ END
 
 sub clone ($) {
     my ($dstdir) = @_;
-    canonicalise_suite();
     badusage "dry run makes no sense with clone" unless act_local();
+    canonicalise_suite();
     my $hasgit = check_for_git();
     mkdir $dstdir or fail "create \`$dstdir': $!";
     changedir $dstdir;
@@ -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";
     }