Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Junio C Hamano
Derrick Stolee writes: > My thought was that using a fixed name > (e.g. .git/objects/info/commit-graph) would block making the graph > incremental. Upon thinking again, this is not the case. That feature > could be designed with a fixed name for the small, frequently-updated >

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Derrick Stolee
On 2/23/2018 2:33 PM, Junio C Hamano wrote: Derrick Stolee writes: The (unlikely, but possible) race condition involves two processes (P1 and P2): 1. P1 reads from graph-latest to see commit graph file F1. 2. P2 updates graph-latest to point to F2 and deletes F1. 3. P1

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Junio C Hamano
Derrick Stolee writes: > The (unlikely, but possible) race condition involves two processes (P1 > and P2): > > 1. P1 reads from graph-latest to see commit graph file F1. > 2. P2 updates graph-latest to point to F2 and deletes F1. > 3. P1 tries to read F1 and fails. > > I could

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Derrick Stolee
On 2/22/2018 1:48 PM, Junio C Hamano wrote: Derrick Stolee writes: Teach git-commit-graph to delete the .graph files that are siblings of a newly-written graph file, except for the file referenced by 'graph-latest' at the beginning of the process and the newly-written file.

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-23 Thread Derrick Stolee
On 2/21/2018 4:34 PM, Stefan Beller wrote: On Mon, Feb 19, 2018 at 10:53 AM, Derrick Stolee wrote: graph_name = write_commit_graph(opts.obj_dir); if (graph_name) { if (opts.set_latest) set_latest_file(opts.obj_dir,

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-22 Thread Junio C Hamano
Derrick Stolee writes: > Teach git-commit-graph to delete the .graph files that are siblings of a > newly-written graph file, except for the file referenced by 'graph-latest' > at the beginning of the process and the newly-written file. If we fail to > delete a graph file, only

Re: [PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-21 Thread Stefan Beller
On Mon, Feb 19, 2018 at 10:53 AM, Derrick Stolee wrote: > graph_name = write_commit_graph(opts.obj_dir); > > if (graph_name) { > if (opts.set_latest) > set_latest_file(opts.obj_dir, graph_name); > > + if

[PATCH v4 08/13] commit-graph: implement --delete-expired

2018-02-19 Thread Derrick Stolee
Teach git-commit-graph to delete the .graph files that are siblings of a newly-written graph file, except for the file referenced by 'graph-latest' at the beginning of the process and the newly-written file. If we fail to delete a graph file, only report a warning because another git process may