chiark / gitweb /
clone: Postpone canonicalise_suite
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 0f9236cef4916d75191db2a1f3f41a662fafcb7c..5056e11d158c067a308a6021679a0296c54ceeee 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3090,15 +3090,15 @@ 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;
     runcmd @git, qw(init -q);
+    clone_set_head();
     my $giturl = access_giturl(1);
     if (defined $giturl) {
-       clone_set_head();
        runcmd @git, qw(remote add), 'origin', $giturl;
     }
     if ($hasgit) {