summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-15 22:43:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-15 22:43:49 (GMT)
commitdb5adf24bf6e0380d4b4ce97f88b4f874773f424 (patch)
tree463ceaa1553402eaab35e2ed4602314a12fd5fcd /builtin/clone.c
parentb80dd559c99ad8afa2d9ec513b18048257547593 (diff)
parent786b150c8d0960cb7c36fb1cbbf70dbd76b586de (diff)
downloadgit-db5adf24bf6e0380d4b4ce97f88b4f874773f424.zip
git-db5adf24bf6e0380d4b4ce97f88b4f874773f424.tar.gz
git-db5adf24bf6e0380d4b4ce97f88b4f874773f424.tar.bz2
Merge branch 'js/clone-dissociate'
"git clone --dissociate" runs a big "git repack" process at the end, and it helps to close file descriptors that are open on the packs and their idx files before doing so on filesystems that cannot remove a file that is still open. * js/clone-dissociate: clone --dissociate: avoid locking pack files sha1_file.c: add a function to release all packs sha1_file: consolidate code to close a pack's file descriptor t5700: demonstrate a Windows file locking issue with `git clone --dissociate`
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 3e14491..9eaecd9 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -1071,8 +1071,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
transport_unlock_pack(transport);
transport_disconnect(transport);
- if (option_dissociate)
+ if (option_dissociate) {
+ close_all_packs();
dissociate_from_references();
+ }
junk_mode = JUNK_LEAVE_REPO;
err = checkout();