Re: [PATCH] clone --dissociate: avoid locking pack files

2015-10-05 Thread Johannes Schindelin
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; >>> + >>> +

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Max Kirillov
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) { >> +

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Junio C Hamano
Max Kirillov writes: >> +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_ref

Re: [PATCH] clone --dissociate: avoid locking pack files

2015-09-30 Thread Max Kirillov
On Mon, Sep 28, 2015 at 09:44:57PM +0200, Johannes Schindelin wrote: > When `git clone` is asked to dissociate the repository from the > reference repository whose objects were used, it is quite possible that > the pack files need to be repacked. In that case, the pack files need to > be deleted th

[PATCH] clone --dissociate: avoid locking pack files

2015-09-28 Thread Johannes Schindelin
When `git clone` is asked to dissociate the repository from the reference repository whose objects were used, it is quite possible that the pack files need to be repacked. In that case, the pack files need to be deleted that were originally hard-links to the reference repository's pack files. On p