Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 04/10] commit-graph: drop redundant flags in write context
Date: Wed, 04 Nov 2026 11:18:37 -0800	[thread overview]
Message-ID: <xmqqa4no1k36.fsf@gitster.g> (raw)
In-Reply-To: <20261104-pks-commit-graph-write-refactorings-v1-4-d013d9401a59@pks.im> (Patrick Steinhardt's message of "Wed, 04 Nov 2026 16:57:26 +0100")

Patrick Steinhardt <ps@pks.im> writes:

> In the preceding commit we have moved the flags that control how we
> write a commit graph into its options structure. As a consequence we
> have those flags implicitly available in the write context, too, as it
> already contains a pointer to the options struct. This makes a couple of
> individual flags that we track in the write context redundant as they
> are a simple alias of the flags.
>
> Drop these redundant flags.
> ...
>  	struct write_commit_graph_context ctx = {
>  		.r = r,
> -		.append = opts->flags & COMMIT_GRAPH_WRITE_APPEND ? 1 : 0,
> -		.report_progress = opts->flags & COMMIT_GRAPH_WRITE_PROGRESS ? 1 : 0,
> -		.split = opts->flags & COMMIT_GRAPH_WRITE_SPLIT ? 1 : 0,

OK, so these are the most important lines in this patch; everything
else is there as a fallout of this change, and as a result, the
remaining code has become much easier to follow.

Nicely done.

  reply	other threads:[~2026-11-04 19:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 15:57 [PATCH 00/10] commit-graph: several refactorings for writing commit graphs Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 01/10] commit-graph: rename `struct commit_graph_opts` Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 02/10] commit-graph: pass writer flags via options Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 03/10] commit-graph: drop `NULL` checks for write options Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 04/10] commit-graph: drop redundant flags in write context Patrick Steinhardt
2026-11-04 19:18   ` Junio C Hamano [this message]
2026-11-04 15:57 ` [PATCH 05/10] commit-graph: merge the two commit graph writers Patrick Steinhardt
2026-11-04 16:33   ` Derrick Stolee
2026-11-04 15:57 ` [PATCH 06/10] commit-graph: move remaining write parameters into options Patrick Steinhardt
2026-11-04 16:34   ` Derrick Stolee
2026-11-04 17:49   ` Kristofer Karlsson
2026-11-04 15:57 ` [PATCH 07/10] commit-graph: fix mixup of write/verify flags Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 08/10] builtin/commit-graph: set flags directly Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 09/10] odb/source-files: verify commit-graphs as part of fsck Patrick Steinhardt
2026-11-04 15:57 ` [PATCH 10/10] commit-graph: modernize function names Patrick Steinhardt
2026-11-04 16:37 ` [PATCH 00/10] commit-graph: several refactorings for writing commit graphs Derrick Stolee

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=xmqqa4no1k36.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox