Re: [PATCH v3 4/8] commit-graph: don't early exit(1) on e.g. "git status"

2019-05-01 Thread Jeff King
On Mon, Apr 29, 2019 at 08:48:51AM -0400, Derrick Stolee wrote: > Q: How should we handle a detectably-invalid commit-graph? > > I think most of your patches have done a good job so far of detecting > an invalid header, and responding by ignoring the commit-graph. This case > of a detectable erro

Re: [PATCH v3 4/8] commit-graph: don't early exit(1) on e.g. "git status"

2019-04-29 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 29 2019, Derrick Stolee wrote: > On 4/27/2019 9:06 AM, Ævar Arnfjörð Bjarmason wrote: >> >> There's still cases left where we'll exit early, e.g. if you do: >> >> $ git diff -U1 >> diff --git a/commit-graph.c b/commit-graph.c >> index 66865acbd7..63773764ce 100644 >>

Re: [PATCH v3 4/8] commit-graph: don't early exit(1) on e.g. "git status"

2019-04-29 Thread Derrick Stolee
On 4/27/2019 9:06 AM, Ævar Arnfjörð Bjarmason wrote: > > There's still cases left where we'll exit early, e.g. if you do: > > $ git diff -U1 > diff --git a/commit-graph.c b/commit-graph.c > index 66865acbd7..63773764ce 100644 > --- a/commit-graph.c > +++ b/commit-graph.c >

Re: [PATCH v3 4/8] commit-graph: don't early exit(1) on e.g. "git status"

2019-04-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 25 2019, Ævar Arnfjörð Bjarmason wrote: > Make the commit-graph loading code work as a library that returns an > error code instead of calling exit(1) when the commit-graph is > corrupt. This means that e.g. "status" will now report commit-graph > corruption as an "error: [...]" at t

[PATCH v3 4/8] commit-graph: don't early exit(1) on e.g. "git status"

2019-03-25 Thread Ævar Arnfjörð Bjarmason
Make the commit-graph loading code work as a library that returns an error code instead of calling exit(1) when the commit-graph is corrupt. This means that e.g. "status" will now report commit-graph corruption as an "error: [...]" at the top of its output, but then proceed to work normally. This