[PATCH v1 00/19] Enable options --signoff, --reset-author for pick, reword

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

this is a reroll of the patch series that enables rudimentary support
of line options for git-rebase's to-do list commands and reimplements
the well-known commands `reword` and `squash` in terms of a
parameterised `do_pick`.

I tried to address all the issues raised by Junio in this reroll.
Here is a short summary.

 - Test that `reword` behaves like `pick` regarding the `pre-commit`
   hook and executes `commit-msg` for the new log message.

 - Instead of disallowing empty log messages for root commits allow
   empty log messages for all unchanged commits.

 - The patch "root commits are replayed with an unnecessary option"
   does not change the behaviour of git-rebase but it makes the
   subsequent patch easier to read.

   The hidden agenda is to have one git-commit command line in
   `do_pick` that takes care of rewriting commits as they are being
   replayed, be they parentless or not. The advantage of having one
   rewrite command instead of one for root commits and one for
   non-root commits is that changes to the rewrite mechanism entail
   less code changes. As more rewriting mechanisms are being added to
   `do_pick`, it becomes important that they compose well with each
   other to avoid having a series of amending commits. The `-C`
   option conflicts with other ways of substituting the log message,
   like files and strings, which is why it seems not to compose so
   well.

 - The patch "explicitly distinguish replay commands and exec tasks"
   does not change behaviour either but is again a separated
   refactoring patch.

   The distinction of the `exec` command and the replay commands,
   which all share the same line format `command args sha1 rest`,
   allows us to employ the positional parameters feature of the shell
   without introducing another indentation level in `do_pick`.

Thanks for your time,
   Fabian

Fabian Ruch (19):
  rebase -i: failed reword prints redundant error message
  rebase -i: allow rewording an empty commit without complaints
  rebase -i: reword executes pre-commit hook on interim commit
  rebase -i: teach do_pick the option --edit
  rebase -i: implement reword in terms of do_pick
  rebase -i: allow replaying commits with empty log messages
  rebase -i: log the replay of root commits
  rebase -i: root commits are replayed with an unnecessary option
  rebase -i: commit only once when rewriting picks
  rebase -i: do not die in do_pick
  rebase -i: teach do_pick the option --amend
  rebase -i: teach do_pick the option --file
  rebase -i: prepare for squash in terms of do_pick --amend
  rebase -i: implement squash in terms of do_pick
  rebase -i: explicitly distinguish replay commands and exec tasks
  rebase -i: parse to-do list command line options
  rebase -i: teach do_pick the option --reset-author
  rebase -i: teach do_pick the option --signoff
  rebase -i: enable options --signoff, --reset-author for pick, reword

 git-rebase--interactive.sh    | 284 ++++++++++++++++++++++++++++++++++--------
 t/t3404-rebase-interactive.sh |  70 +++++++++++
 t/t3412-rebase-root.sh        |  19 +++
 t/test-lib-functions.sh       |   6 +-
 4 files changed, 325 insertions(+), 54 deletions(-)

-- 
2.0.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]