From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: git@vger.kernel.org, David Bimmler <david.bimmler@isovalent.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 2/5] sequencer: start removing private fields from public API
Date: Thu, 18 Apr 2024 13:42:20 -0700 [thread overview]
Message-ID: <xmqqa5lqs8r7.fsf@gitster.g> (raw)
In-Reply-To: <2beedb4547013629a507d646d582ca6b3f420c2c.1713445918.git.phillip.wood@dunelm.org.uk> (Phillip Wood's message of "Thu, 18 Apr 2024 14:14:06 +0100")
Phillip Wood <phillip.wood123@gmail.com> writes:
> +/*
> + * A 'struct replay_ctx' represents the private state of the sequencer.
> + */
> +struct replay_ctx {
> + /*
> + * Stores the reflog message that will be used when creating a
> + * commit. Points to a static buffer and should not be free()'d.
> + */
> + const char *reflog_message;
> +};
> +
> +struct replay_ctx* replay_ctx_new(void)
Style.
Also if you intend to make the structure opaque and private,
shouldn't you make this static to make it truly internal? The
initializer of the containing replay_opts structure would be the
only thing that needs to know how to instantiate it, no? Or does a
replay_ctx has reason to exist outside the context of an instance of
replay_opts?
i.e.
static struct replay_ctx *replay_ctx_new(void)
The remainder seem mechanical so I'll skip them.
next prev parent reply other threads:[~2024-04-18 20:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 13:14 [PATCH 0/5] rebase -m: fix --signoff with conflicts Phillip Wood
2024-04-18 13:14 ` [PATCH 1/5] sequencer: always free "struct replay_opts" Phillip Wood
2024-04-18 13:14 ` [PATCH 2/5] sequencer: start removing private fields from public API Phillip Wood
2024-04-18 20:42 ` Junio C Hamano [this message]
2024-04-18 13:14 ` [PATCH 3/5] sequencer: move current fixups to private context Phillip Wood
2024-04-18 20:48 ` Junio C Hamano
2024-04-18 13:14 ` [PATCH 4/5] sequencer: store commit message in " Phillip Wood
2024-04-18 21:03 ` Junio C Hamano
2024-04-18 13:14 ` [PATCH 5/5] rebase -m: fix --signoff with conflicts Phillip Wood
2024-04-18 21:16 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa5lqs8r7.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=david.bimmler@isovalent.com \
--cc=git@vger.kernel.org \
--cc=phillip.wood123@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).