Re: [PATCH v2 23/23] rebase -i: enable options --signoff, --reset-author for pick, reword
From: Fabian Ruch <hidden>
Date: 2016-06-15 23:02:16
Hi, Michael Haggerty writes:
On 08/07/2014 01:59 AM, Fabian Ruch wrote:quoted
Lift the general unknown option blockade for the pick and reword commands. If `do_cmd` comes across one of the options `--signoff` and `--reset-author` while parsing a to-do entry and the scheduled command is either `pick` or `reword`, relay the option to `do_pick`.The new user-exposed options should be documented in the git-rebase(1) manpage and probably also in the help text that is appended to every "rebase -i" todo list.
The next reroll will add the following paragraph to the git-rebase man page right after the introduction of the 'reword' command in the section "INTERACTIVE MODE":
The commands "pick" and "reword" understand some well-known options. To add a Signed-off-by line at the end of the commit message, pass the `--signoff` option. The authorship can be renewed by specifying the `--reset-author` option. For instance, before you decide to publish a heavily edited commit you might want to reset the authorship and add your signature. You can do so on a per line basis: ------------------------------------------- pick deadbee The oneline of this commit pick --reset-author --signoff fa1afe1 The oneline of the next commit ... -------------------------------------------
By saying "heavily edited commit" I tried to describe a commit that has been amended, reworded and reordered in such a way that the actual author information has become meaningless. The help text at the end of every to-do list would look like this:
Commands: p, pick = use commit r, reword = use commit, but edit the commit message e, edit = use commit, but stop for amending s, squash = use commit, but meld into previous commit f, fixup = like "squash", but discard this commit's log message x, exec = run command (the rest of the line) using shell Options: [pick | reword] --signoff = add a Signed-off-by line [pick | reword] --reset-author = renew authorship These lines can be re-ordered; they are executed from top to bottom. If you remove a line here THAT COMMIT WILL BE LOST.
New about this is the "Options" headline. Fabian