summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-14 15:33:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-14 15:33:49 (GMT)
commit32e820bdc5ca66d53605bfdcb0751b21a2372de2 (patch)
tree3c732c0970efd3878892ba8342049ebabf6c0f6a /builtin
parentbc60f9f37767f72d7ef73a4df536e199a3c13540 (diff)
parent9be1980bb966cb1bc187b62803e6b76087fd5aac (diff)
downloadgit-32e820bdc5ca66d53605bfdcb0751b21a2372de2.zip
git-32e820bdc5ca66d53605bfdcb0751b21a2372de2.tar.gz
git-32e820bdc5ca66d53605bfdcb0751b21a2372de2.tar.bz2
Merge branch 'jl/interrupt-clone-remove-separate-git-dir' into maint
When "git clone --separate-git-dir=$over_there" is interrupted, it failed to remove the real location of the $GIT_DIR it created. This was most visible when interrupting a submodule update. * jl/interrupt-clone-remove-separate-git-dir: clone: support atomic operation with --separate-git-dir
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index ec2f75b..8d23a62 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -771,8 +771,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
die(_("could not create leading directories of '%s'"), git_dir);
set_git_dir_init(git_dir, real_git_dir, 0);
- if (real_git_dir)
+ if (real_git_dir) {
git_dir = real_git_dir;
+ junk_git_dir = real_git_dir;
+ }
if (0 <= option_verbosity) {
if (option_bare)