diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-01-05 21:15:49 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-01-05 21:15:49 +0000 |
commit | 07a861b637e45f33cfbb9031e6fe4061f31e929c (patch) | |
tree | bc4d5f20de504b3a550b670a7fdab17649dca29c /dgit | |
parent | b2cc53039123fae1e871b9727730f418d8065905 (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>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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(); |