All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Taylor Blau <me@ttaylorr.com>, git@vger.kernel.org
Cc: peff@peff.net, dstolee@microsoft.com
Subject: Re: [PATCH 1/3] commit-graph: pass a 'struct repository *' in more places
Date: Tue, 30 Jun 2020 16:52:15 -0400	[thread overview]
Message-ID: <00a3658e-323c-0719-5f26-4689e2a90374@gmail.com> (raw)
In-Reply-To: <4ea9933b50fe0bc2738ab0e0dc52a4f17c4a2cb4.1593536481.git.me@ttaylorr.com>

On 6/30/2020 1:17 PM, Taylor Blau wrote:
> In a future commit, some commit-graph internals will want access to
> 'r->settings', but we only have the 'struct object_directory *'
> corresponding to that repository.

It is good to use "struct repository *" more.

> Add an additional parameter to pass the repository around in more
> places. In the next patch, we will remove the object directory (and
> instead reference it with 'r->odb').

And this is a good reason why we need the repository here: we will
need the settings AND odb.

> diff --git a/commit-graph.h b/commit-graph.h
> index 3ba0da1e5f..03d848e168 100644
> --- a/commit-graph.h
> +++ b/commit-graph.h
> @@ -76,10 +76,12 @@ struct commit_graph {
>  };
>  
>  struct commit_graph *load_commit_graph_one_fd_st(int fd, struct stat *st,
> +						 struct repository *r,
>  						 struct object_directory *odb);

I suppose my only nit is that the struct repository pointer is
not always the first parameter. I understand that you have grouped
it where the 'odb' parameter is here, so perhaps that is fine.

Feel free to ignore this nit.

Thanks,
-Stolee

  reply	other threads:[~2020-06-30 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 17:17 [PATCH 0/3] commit-graph: introduce 'core.useBloomFilters' Taylor Blau
2020-06-30 17:17 ` [PATCH 1/3] commit-graph: pass a 'struct repository *' in more places Taylor Blau
2020-06-30 20:52   ` Derrick Stolee [this message]
2020-06-30 17:17 ` [PATCH 2/3] t4216: fix broken '&&'-chain Taylor Blau
2020-06-30 17:50   ` Eric Sunshine
2020-06-30 18:39     ` Taylor Blau
2020-06-30 19:03       ` Jeff King
2020-06-30 19:12         ` Taylor Blau
2020-06-30 19:19           ` Jeff King
2020-06-30 19:48         ` Eric Sunshine
2020-06-30 18:55     ` Jeff King
2020-06-30 17:17 ` [PATCH 3/3] commit-graph: respect 'core.useBloomFilters' Taylor Blau
2020-06-30 19:18   ` Jeff King
2020-06-30 19:27     ` Taylor Blau
2020-06-30 19:33       ` Jeff King
2020-08-03 19:02 ` [PATCH 0/3] commit-graph: introduce 'core.useBloomFilters' Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00a3658e-323c-0719-5f26-4689e2a90374@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.