chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
48bc72c
)
Do not remove destination when clone fails because it already exists (!)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 3 Aug 2014 19:25:33 +0000
(20:25 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 3 Aug 2014 19:25:33 +0000
(20:25 +0100)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index 17b71898eb658660acd65dfbae24e68001cd0e07..d587527cb73c32c271b8d576a846bd3e5061515e 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-1515,6
+1515,12
@@
sub cmd_clone {
}
$dstdir ||= "$package";
}
$dstdir ||= "$package";
+ if (stat $dstdir) {
+ fail "$dstdir already exists";
+ } elsif ($! != &ENOENT) {
+ die "$dstdir: $!";
+ }
+
my $cwd_remove;
if ($rmonerror && !$dryrun_level) {
$cwd_remove= getcwd();
my $cwd_remove;
if ($rmonerror && !$dryrun_level) {
$cwd_remove= getcwd();