Skip to content

git clone with --separate-git-dir destroys existing directory content

Ben Wijen git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2git clone: check for non-empty directoryt/t5601-clone.sh+2 -13 replies
2/2git clone: don't clone into non-empty directorybuiltin/clone.c+10 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] git clone with --separate-git-dir destroys existing directory content

Hi,

I found an issue with git clone, when using --separate-git-dir and that directory already exists, it's content is destroyed.

I have created a patch set on origin/next, but (as I have learned this the hard way) please let me know if this needs to be backported...

Ben...

Ben Wijen (2):
git clone: check for non-empty directory
git clone: don't clone into non-empty directory

 builtin/clone.c  | 12 ++++++++++--
 t/t5601-clone.sh |  3 ++-
 2 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
2.27.0