Skip to content

Commit 0cfcae6

Browse files
committed
Merge pull request termie#53 from john-peterson/clone
Allowing clone to empty folder
2 parents de9248b + f42b183 commit 0cfcae6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-bzr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ def cmd_clone(args):
401401
branch = 'master'
402402
bzr_ref = bzr_ref_name(branch)
403403

404-
if os.path.exists(target):
405-
die('Directory already exists: %s', target)
404+
if os.path.exists(target) and os.listdir(target) != []:
405+
die('Directory already exists and isn\'t empty: %s', target)
406406

407407
git(['init', target])
408408
os.chdir(target)

0 commit comments

Comments
 (0)