ref: c0e521dfdc35c937e76545171e9c1291d66d4151
parent: 9aac97e7073344a4314a17fcf986c5bb8221f149
author: Ori Bernstein <ori@eigenstate.org>
date: Mon May 27 11:02:28 EDT 2024
git/clone: allow cloning into an empty directory
--- a/sys/src/cmd/git/clone
+++ b/sys/src/cmd/git/clone
@@ -17,8 +17,8 @@
if(~ $#branch 1)
branchflag=(-b $branch)
-if(test -e $local)
- die 'repository already exists:' $local
+if(test -e $local && ~ `{ls $local | sed 1q | wc -l} 1)
+ die 'destination already exists:' $local
fn clone{
flag +e
--
⑨