Re: [PATCH] clone --dissociate: avoid locking pack files
- From
Max Kirillov <max@max630.net>
- Date
- Oct 1, 2015, 04:39 UTC
- Message-ID
- <20151001043936.GB26154@wheezy.local>
- In-Reply-To
- <20150930192814.GA26154@wheezy.local>
On Wed, Sep 30, 2015 at 10:28:14PM +0300, Max Kirillov wrote:
Show 11 quoted lines
> 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?
-- Max