From 07a861b637e45f33cfbb9031e6fe4061f31e929c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 5 Jan 2019 21:15:49 +0000 Subject: [PATCH] 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 --- dgit | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); -- 2.30.2