Re: [PATCH RFC v2 08/19] rebase -i: Root commits are replayed with an unnecessary option
flat view
From: Fabian Ruch <hidden>
Date: 2016-06-15 23:01:59
Hi Junio, Junio C Hamano writes:
Fabian Ruch [off-list ref] writes:quoted
It makes the next patch easier to understand because the finalising command line "git commit --allow-empty --amend --no-post-rewrite -n --no-edit" seems to be simply moved to the end of do_pick. Substituting --no-edit for -C there would make that log message overly long ...And the reason why the same "-C $1" is not used and "--no-edit" is used in the final version that is moved to the end of do_pick is...?
The finalising command line is executed by do_pick to rewrite $1 when it is being replayed. For instance, one purpose of rewriting is amending the current head with the changes introduced by $1. In this case, we don't want the log message of $1 to be the final log message. Another purpose of rewriting is using a text file or a string as log message, which would be defeated by "-C $1" as well. It's true that, by the time the next patch is introduced, do_pick doesn't yet implement either rewriting mechanism (they are both used to thread "squash" through do_pick later on) but these considerations suggest that "-C $1" might not be what we want to use to disable the log message editor. Fabian