From: Johannes Schindelin Date: Mon, 05 Oct 2015 18:32:35 GMT Subject: Re: [PATCH] clone --dissociate: avoid locking pack files Message-ID: <4033cd50d604c7088633e6b99f0f9b6a@dscho.org> In-Reply-To: <20151001043936.GB26154@wheezy.local> Hi Max, On 2015-10-01 06:39, Max Kirillov wrote: > On Wed, Sep 30, 2015 at 10:28:14PM +0300, Max Kirillov wrote: >> On Mon, Sep 28, 2015 at 09:44:57PM +0200, Johannes Schindelin wrote: >>> - if (option_dissociate) >>> + if (option_dissociate) { >>> + struct packed_git *p; >>> + >>> + for (p = packed_git; p; p = p->next) { >>> + close_pack_windows(p); >>> + close_pack_index(p); >>> + } >>> dissociate_from_references(); >>> + } > >> This does not seem to close handles to the pack files >> themseves, does Windows still allow removing the files? I >> probably did not tried that, because I started from handles, >> and discovered mapped files only later. > > Apparently, pack file is closed just after mapping if it's > smaller than core.packedGitWindowSize. Could it be the > reason that this patch worked in you test case? That must be the reason, thanks! Ciao, Dscho