Subject: Re: [PATCH 7/8] commit-graph: not compatible with uninitialized repo

From: Jakub Narebski <[email-masked]>
Date: Mon, 30 Jul 2018 00:46:21 +0200

"Derrick Stolee via GitGitGadget" <[email-masked]> writes:

[I hope that the rest of replies would make it all right through
GitGitGadget]

> From: Derrick Stolee <[email-masked]>
>
> Signed-off-by: Derrick Stolee <[email-masked]>
> ---
>  commit-graph.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/commit-graph.c b/commit-graph.c
> index 5097c7c12..233958e10 100644
> --- a/commit-graph.c
> +++ b/commit-graph.c
> @@ -60,6 +60,9 @@ static struct commit_graph *alloc_commit_graph(void)
>  
>  static int commit_graph_compatible(struct repository *r)
>  {
> +	if (!r->gitdir)
> +		return 0;
> +

Nice catch.

I wonder if this is the problem because of the following tests (in which
case this test should probably be earlier in this series), or not (and
it doesn't need to).

I wonder how this issue was caught.

>  	prepare_commit_graft(r);
>  	if (r->parsed_objects && r->parsed_objects->grafts_nr)
>  		return 0;

No tests?