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

Re: [RFC PATCH 08/11] rebase -i: use struct rebase_options to parse args

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 22, 2019, 03:34 UTC
Message-ID
<xmqqlg17r38v.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<94fe6518-ca13-8eb8-d455-e2a6fcaeb1d6@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 37 quoted lines
> Hi Junio
>
> On 21/03/2019 04:21, Junio C Hamano wrote:
>> Phillip Wood <phillip.wood123@gmail.com> writes:
>>
>>> +static struct replay_opts get_replay_opts(const struct rebase_options *opts)
>>> +{
>>> +	struct replay_opts replay = REPLAY_OPTS_INIT;
>>> +
>>> +	sequencer_init_config(&replay);
>>> +
>>> +	replay.action = REPLAY_INTERACTIVE_REBASE;
>>> +	replay.signoff = opts->signoff;
>>> +	replay.allow_ff = !(opts->flags & REBASE_FORCE);
>>> +	if (opts->allow_rerere_autoupdate)
>>> +		replay.allow_rerere_auto = opts->allow_rerere_autoupdate;
>>> +	replay.allow_empty = 1;
>>> +	replay.allow_empty_message = opts->allow_empty_message;
>>> +	replay.verbose = opts->flags & REBASE_VERBOSE;
>>> +	replay.reschedule_failed_exec = opts->reschedule_failed_exec;
>>> +	replay.gpg_sign = xstrdup_or_null(opts->gpg_sign_opt);
>>> +	replay.strategy = opts->strategy;
>>> +
>>> +	return replay;
>>> +}
>>
>> This calls init_config() and then sets .action; does it revert to
>> what dl/merge-cleanup-scissors-fix wants to do, which flipped the
>> order to fix some bug?  It is a bit hard to tell.
>
> dl/merge-cleanup-scissors-fix changes sequencer_init_config() to
> depend on the value of action so action should to be set first. What
> is in pu at the moment in not quite right (though I'm not sure what
> the practical implications are as it looks like the rebase tests are
> passing[1]).
>
> [1] https://travis-ci.org/git/git/jobs/509332448

Yes, it actually is the reason why I left the seemingly-wrong merge in 'pu' on purpose to see if we have enough test coverage.

Show 6 quoted lines
> they'd both be in the same file. I think it would only need to share
> the definitions of struct rebase_options, enum rebase_action and the
> declaration of run_rebase_interactive(). Would you be happy with the
> addition of builtin/rebase.h (there don't seem to be another headers
> in that directory). We could leave rebase--interactive.c around until
> rebase--preserve-merges.sh is finally removed.

I think dl/merge-cleanup-scissors-fix is getting solid enough, so a better alternative may be to base this on top of

	reset e902e9bcae ;# The second batch
	merge ag/sequencer-reduce-rewriting-todo
	merge dl/merge-cleanup-scissors-fix
instead of basing it only on ag/sequencer-reduce-rewriting-todo.
Thanks.
Previous: Phillip WoodNext: Alban Gruin
Message 14 of 40 in “rebase -i run without forking rebase--interactive”
  1. 00/11 rebase -i run without forking rebase--interactivePhillip Wood, Mar 19, 2019
  2. 02/11 rebase: rename write_basic_state()Phillip Wood, Mar 19, 2019
  3. 01/11 sequencer: always discard index after checkoutPhillip Wood, Mar 19, 2019
  4. Duy NguyenMar 20, 2019
  5. Phillip WoodMar 21, 2019
  6. 03/11 rebase: use OPT_RERERE_AUTOUPDATE()Phillip Wood, Mar 19, 2019
  7. 05/11 rebase -i: remove duplicationPhillip Wood, Mar 19, 2019
  8. 06/11 rebase -i: use struct commit when parsing optionsPhillip Wood, Mar 19, 2019
  9. 04/11 rebase -i: combine rebase--interactive.c with rebase.cPhillip Wood, Mar 19, 2019
  10. 07/11 rebase -i: use struct object_id for squash_ontoPhillip Wood, Mar 19, 2019
  11. 08/11 rebase -i: use struct rebase_options to parse argsPhillip Wood, Mar 19, 2019
  12. Junio C HamanoMar 21, 2019
  13. Phillip WoodMar 21, 2019
  14. Junio C HamanoMar 22, 2019
  15. Alban GruinMar 21, 2019
  16. Phillip WoodApr 10, 2019
  17. 10/11 rebase: use a common action enumPhillip Wood, Mar 19, 2019
  18. Ævar Arnfjörð BjarmasonMar 19, 2019
  19. Phillip WoodMar 21, 2019
  20. 09/11 rebase -i: use struct rebase_options in do_interactive_rebase()Phillip Wood, Mar 19, 2019
  21. 11/11 rebase -i: run without forking rebase--interactivePhillip Wood, Mar 19, 2019
  22. Josh SteadmonMar 20, 2019
  23. Ævar Arnfjörð BjarmasonMar 20, 2019
  24. Phillip WoodMar 21, 2019
  25. Junio C HamanoMar 21, 2019
  26. 00/12 Run rebase -i without forking rebase--interactivePhillip Wood, Apr 17, 2019
  27. 01/12 sequencer: always discard index after checkoutPhillip Wood, Apr 17, 2019
  28. 03/12 rebase: rename write_basic_state()Phillip Wood, Apr 17, 2019
  29. 04/12 rebase: use OPT_RERERE_AUTOUPDATE()Phillip Wood, Apr 17, 2019
  30. 02/12 rebase: don't translate trace stringsPhillip Wood, Apr 17, 2019
  31. Junio C HamanoApr 19, 2019
  32. Phillip WoodApr 25, 2019
  33. 05/12 rebase -i: combine rebase--interactive.c with rebase.cPhillip Wood, Apr 17, 2019
  34. 06/12 rebase -i: remove duplicationPhillip Wood, Apr 17, 2019
  35. 08/12 rebase -i: use struct object_id for squash_ontoPhillip Wood, Apr 17, 2019
  36. 07/12 rebase -i: use struct commit when parsing optionsPhillip Wood, Apr 17, 2019
  37. 09/12 rebase -i: use struct rebase_options to parse argsPhillip Wood, Apr 17, 2019
  38. 10/12 rebase -i: use struct rebase_options in do_interactive_rebase()Phillip Wood, Apr 17, 2019
  39. 12/12 rebase -i: run without forking rebase--interactivePhillip Wood, Apr 17, 2019
  40. 11/12 rebase: use a common action enumPhillip Wood, Apr 17, 2019

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.