summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-01-05 21:15:49 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-01-05 21:15:49 +0000
commit07a861b637e45f33cfbb9031e6fe4061f31e929c (patch)
treebc4d5f20de504b3a550b670a7fdab17649dca29c
parentb2cc53039123fae1e871b9727730f418d8065905 (diff)
dgit: clone: Create destination directory before using network
We are going to want to check the bpd (apropos of #913648), which might be a relative path. We should fail quickly in this case. No significant functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit6
1 files changed, 4 insertions, 2 deletions
diff --git a/dgit b/dgit
index 922d719..b25d344 100755
--- a/dgit
+++ b/dgit
@@ -3758,10 +3758,12 @@ sub clone ($) {
}
printdebug "clone main body\n";
- canonicalise_suite();
- my $hasgit = check_for_git();
mkdir $dstdir or fail f_ "create \`%s': %s", $dstdir, $!;
changedir $dstdir;
+
+ canonicalise_suite();
+ my $hasgit = check_for_git();
+
runcmd @git, qw(init -q);
record_maindir();
setup_new_tree();