git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] t/lib-rebase: set_fake_editor(): handle FAKE_LINES more consistently

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2023, 19:09 UTC
Message-ID
<xmqqzg32ekku.fsf@gitster.g>
In-Reply-To
<20230807170935.2336663-3-oswald.buddenhagen@gmx.de>
Oswald Buddenhagen <oswald.buddenhagen@gmx.de> writes:
Show 16 quoted lines
> 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.
Show 13 quoted lines
> 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=\&;;
Previous: Oswald BuddenhagenNext: Phillip Wood
Message 21 of 22 in “t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor()”
  1. t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor()Oswald Buddenhagen, Mar 23, 2023
  2. Oswald BuddenhagenApr 26, 2023
  3. Junio C HamanoApr 26, 2023
  4. Felipe ContrerasMay 2, 2023
  5. Phillip WoodMay 17, 2023
  6. 0/3 t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor()Oswald Buddenhagen, Aug 7, 2023
  7. 1/3 t/lib-rebase: set_fake_editor(): fix recognition of reset's short commandOswald Buddenhagen, Aug 7, 2023
  8. Junio C HamanoAug 7, 2023
  9. 3/3 t/lib-rebase: improve documentation of set_fake_editor()Oswald Buddenhagen, Aug 7, 2023
  10. Phillip WoodAug 9, 2023
  11. 0/1 t/lib-rebase: (mostly) cosmetic improvements to set_fake_editor()Oswald Buddenhagen, Aug 9, 2023
  12. 1/1 t/lib-rebase: improve documentation of set_fake_editor()Oswald Buddenhagen, Aug 9, 2023
  13. Junio C HamanoAug 9, 2023
  14. Phillip WoodAug 10, 2023
  15. Junio C HamanoAug 10, 2023
  16. Junio C HamanoAug 9, 2023
  17. Oswald BuddenhagenAug 10, 2023
  18. Junio C HamanoAug 10, 2023
  19. Junio C HamanoAug 10, 2023
  20. 2/3 t/lib-rebase: set_fake_editor(): handle FAKE_LINES more consistentlyOswald Buddenhagen, Aug 7, 2023
  21. Junio C HamanoAug 7, 2023
  22. Phillip WoodAug 9, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.