From: Ian Jackson Date: Sat, 5 Jan 2019 21:15:49 +0000 (+0000) Subject: dgit: clone: Create destination directory before using network X-Git-Tag: archive/debian/8.3~33 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=07a861b637e45f33cfbb9031e6fe4061f31e929c 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 --- diff --git a/dgit b/dgit index 922d7196..b25d344f 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();