All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH 2/3] t/lib-rebase: set_fake_editor(): handle FAKE_LINES more consistently
Date: Mon, 07 Aug 2023 12:09:05 -0700	[thread overview]
Message-ID: <xmqqzg32ekku.fsf@gitster.g> (raw)
In-Reply-To: <20230807170935.2336663-3-oswald.buddenhagen@gmx.de> (Oswald Buddenhagen's message of "Mon, 7 Aug 2023 19:09:34 +0200")

Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:

> Default next action after 'fakesha' to preserving the command instead
> of forcing 'pick', consistently with other "instant-effect" keywords.
> There is no reason why one would want that inconsistency, so this was
> clearly just an oversight in commit 5dcdd740 ("t/lib-rebase: prepare
> for testing `git rebase --rebase-merges`"). Rectifying it makes the
> behavior easier to reason about and document.
>
> This would affect hypothetical "fakesha <n>" sequences where line <n>
> already isn't a pick, which currently don't appear.
>
> Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
> ---
> Cc: Phillip Wood <phillip.wood123@gmail.com>
> ---
>  t/lib-rebase.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I do recall seeing this change and remember wondering what the
fallout from this change would be.  So relative to the previous
round, the above is a definite improvement to clearly state that no
test that is currently in the codebase is affected by this change.

As to the change itself, I do not much care among (1) what this
patch does, (2) doing nothing, or (3) barf when the action is not a
pick.  At least, having this step separate from other changes like
this round of the series does is a very good thing---when somebody
with more knowledge and stake in what the fake-editor does appears
and explains why forcing pick is a good idea, we can easily revert
only this step.

Will queue as-is together with the other two patches.

Thanks.

> diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
> index e6179ab529..9ed87ca7ab 100644
> --- a/t/lib-rebase.sh
> +++ b/t/lib-rebase.sh
> @@ -64,7 +64,7 @@ set_fake_editor () {
>  		fakesha)
>  			test \& != "$action" || action=pick
>  			echo "$action XXXXXXX False commit" >> "$1"
> -			action=pick;;
> +			action=\&;;
>  		*)
>  			sed -n "${line}s/^[a-z][a-z]*/$action/p" < "$1".tmp >> "$1"
>  			action=\&;;

  reply	other threads:[~2023-08-07 19:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 16:22 [PATCH] t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor() Oswald Buddenhagen
2023-04-26 15:45 ` Oswald Buddenhagen
2023-04-26 17:24   ` Junio C Hamano
2023-05-02 16:38     ` Felipe Contreras
2023-05-17  9:23 ` Phillip Wood
2023-08-07 17:09   ` [PATCH 0/3] " Oswald Buddenhagen
2023-08-07 17:09     ` [PATCH 1/3] t/lib-rebase: set_fake_editor(): fix recognition of reset's short command Oswald Buddenhagen
2023-08-07 19:00       ` Junio C Hamano
2023-08-07 17:09     ` [PATCH 2/3] t/lib-rebase: set_fake_editor(): handle FAKE_LINES more consistently Oswald Buddenhagen
2023-08-07 19:09       ` Junio C Hamano [this message]
2023-08-07 17:09     ` [PATCH 3/3] t/lib-rebase: improve documentation of set_fake_editor() Oswald Buddenhagen
2023-08-09 13:04       ` Phillip Wood
2023-08-09 17:15         ` [PATCH v2 0/1] t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor() Oswald Buddenhagen
2023-08-09 17:15           ` [PATCH v2 1/1] t/lib-rebase: improve documentation of set_fake_editor() Oswald Buddenhagen
2023-08-09 19:38             ` Junio C Hamano
2023-08-10 14:37             ` Phillip Wood
2023-08-10 15:49               ` Junio C Hamano
2023-08-09 21:15           ` [PATCH v2 0/1] t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor() Junio C Hamano
2023-08-10 10:42             ` Oswald Buddenhagen
2023-08-10 16:00               ` Junio C Hamano
2023-08-10 23:57                 ` Junio C Hamano
2023-08-09 13:05     ` [PATCH 0/3] " Phillip Wood

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=xmqqzg32ekku.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=oswald.buddenhagen@gmx.de \
    --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.
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.