Git development
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Cc: Pablo Sabater <pabloosabaterr@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 3/9] reset: modernize flags passed to `reset_head()`
Date: Fri, 5 Jun 2026 16:08:57 +0100	[thread overview]
Message-ID: <9e2cb34b-97f6-44f4-be44-60f44760e601@gmail.com> (raw)
In-Reply-To: <20260603-b4-pks-history-drop-v2-3-742cb5b5176d@pks.im>

Hi Patrick

On 03/06/2026 17:14, Patrick Steinhardt wrote:

> -/* Update ORIG_HEAD as well as HEAD */
> -#define RESET_ORIG_HEAD (1<<4)
 > [...]> +	/* Update ORIG_HEAD as well as HEAD */
> +	RESET_HEAD_ORIG_HEAD = (1 << 4),

I'm having a hard time parsing this new name, if we must have a 
"RESET_HEAD_" prefix can we call it something like 
RESET_HEAD_UPDATE_ORIG_HEAD?

Thanks

Phillip

> +};
>   
>   struct reset_head_opts {
>   	/*
> @@ -33,7 +39,7 @@ struct reset_head_opts {
>   	/*
>   	 * Flags defined above.
>   	 */
> -	unsigned flags;
> +	enum reset_head_flags flags;
>   	/*
>   	 * Optional reflog message for branch, defaults to head_msg.
>   	 */
> @@ -45,7 +51,7 @@ struct reset_head_opts {
>   	const char *head_msg;
>   	/*
>   	 * Optional reflog message for ORIG_HEAD, if this omitted and flags
> -	 * contains RESET_ORIG_HEAD then default_reflog_action must be given.
> +	 * contains RESET_HEAD_ORIG_HEAD then default_reflog_action must be given.
>   	 */
>   	const char *orig_head_msg;
>   	/*
> diff --git a/sequencer.c b/sequencer.c
> index 1ee4b2875b..0b89a977b0 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -4870,7 +4870,7 @@ static int checkout_onto(struct repository *r, struct replay_opts *opts,
>   	struct reset_head_opts ropts = {
>   		.oid = onto,
>   		.orig_head = orig_head,
> -		.flags = RESET_HEAD_DETACH | RESET_ORIG_HEAD |
> +		.flags = RESET_HEAD_DETACH | RESET_HEAD_ORIG_HEAD |
>   				RESET_HEAD_RUN_POST_CHECKOUT_HOOK,
>   		.head_msg = reflog_message(opts, "start", "checkout %s",
>   					   onto_name),
> 


  parent reply	other threads:[~2026-06-05 15:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 15:36 [PATCH 0/2] builtin/history: introduce "drop" subcommand Patrick Steinhardt
2026-06-01 15:36 ` [PATCH 1/2] builtin/history: split handling of ref updates into two phases Patrick Steinhardt
2026-06-01 15:36 ` [PATCH 2/2] builtin/history: implement "drop" subcommand Patrick Steinhardt
2026-06-01 23:43   ` Junio C Hamano
2026-06-03 10:06     ` Patrick Steinhardt
2026-06-02  7:31   ` Pablo Sabater
2026-06-03 10:06     ` Patrick Steinhardt
2026-06-03 16:13 ` [PATCH v2 0/9] builtin/history: introduce " Patrick Steinhardt
2026-06-03 16:14   ` [PATCH v2 1/9] read-cache: split out function to drop unmerged entries to stage 0 Patrick Steinhardt
2026-06-03 16:14   ` [PATCH v2 2/9] reset: drop `USE_THE_REPOSITORY_VARIABLE` Patrick Steinhardt
2026-06-03 16:14   ` [PATCH v2 3/9] reset: modernize flags passed to `reset_head()` Patrick Steinhardt
2026-06-03 18:01     ` Kristoffer Haugsbakk
2026-06-05 15:08     ` Phillip Wood [this message]
2026-06-03 16:14   ` [PATCH v2 4/9] reset: introduce dry-run mode Patrick Steinhardt
2026-06-03 18:18     ` Kristoffer Haugsbakk
2026-06-03 23:49     ` Junio C Hamano
2026-06-03 16:14   ` [PATCH v2 5/9] reset: introduce ability to skip reference updates Patrick Steinhardt
2026-06-03 23:51     ` Junio C Hamano
2026-06-04  9:01       ` Patrick Steinhardt
2026-06-05 15:12     ` Phillip Wood
2026-06-03 16:14   ` [PATCH v2 6/9] reset: allow the caller to specify the current HEAD object Patrick Steinhardt
2026-06-03 16:14   ` [PATCH v2 7/9] reset: stop assuming that the caller passes in a clean index Patrick Steinhardt
2026-06-03 16:14   ` [PATCH v2 8/9] builtin/history: split handling of ref updates into two phases Patrick Steinhardt
2026-06-03 16:14   ` [PATCH v2 9/9] builtin/history: implement "drop" subcommand Patrick Steinhardt
2026-06-03 19:04     ` Kristoffer Haugsbakk
2026-06-04  9:02       ` Patrick Steinhardt
2026-06-03 23:58     ` Junio C Hamano
2026-06-04  9:02       ` Patrick Steinhardt

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=9e2cb34b-97f6-44f4-be44-60f44760e601@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pabloosabaterr@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --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