diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-11-03 15:32:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-11-03 15:32:29 -0800 |
commit | f836a32ba75beded3bca960f2918e08309642c62 (patch) | |
tree | bf4332f809f98afdde66c5b02e763e6efd975a63 /builtin | |
parent | Merge branch 'ld/p4-import-labels' into maint (diff) | |
parent | clone --dissociate: avoid locking pack files (diff) | |
download | tgif-f836a32ba75beded3bca960f2918e08309642c62.tar.xz |
Merge branch 'js/clone-dissociate' into maint
"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')
-rw-r--r-- | builtin/clone.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 578da85254..cc896e22d1 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1064,8 +1064,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(); |