git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: git discussion list <git@vger.kernel.org>,
	Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: GSoC idea: allow "git rebase --interactive" todo lines to take options
Date: Wed, 26 Feb 2014 05:52:49 -0500	[thread overview]
Message-ID: <20140226105249.GE25711@sigill.intra.peff.net> (raw)
In-Reply-To: <530DA00E.4090402@alum.mit.edu>

On Wed, Feb 26, 2014 at 09:04:30AM +0100, Michael Haggerty wrote:

> It would be nice to support more flexibility in the todo-list commands
> by allowing the commands to take options.  Maybe
> 
> * Convert a commit into a merge commit:
> 
>       pick -p c0ffeee -p e1ee712 deadbab The oneline of the commit after

This seems like a reasonable feature to me. All of your examples are
possible with an "e"dit and another git command, but the convenience may
be worth it (though personally, most of the examples you gave are
particularly interesting to me[1]).

I'd worry a little that it is not a summer's worth of work, but I
suspect there are other parts of rebase--interactive that could use
attention once the student is familiar with the code.

> * After squashing two commits, add a "Signed-off-by" line to the
>   commit log message:
> 
>     pick deadbee Implement feature XXX
>     squash --signoff f1a5c00 Fix to feature XXX
> 
>   or GPG-sign a commit:
> 
>     pick --gpg-sign=<keyid> deadbee Implement feature XXX
> 
> * Reset the author of the commit to the current user or a specified
>   user:
> 
>     pick --reset-author deadbee Implement feature XXX
>     pick --author="A U Thor <author@example.com>" deadbab The oneline of
> the commit after

Your first example would need some commit-tree magic, I think. But could
you implement these two with:

   pick deadbee Implement feature XXX
   exec git commit --amend --signoff --reset-author

? You could even alias the "amend" command to "exec git commit --amend",
like:

  amend --signoff --reset-author

Maybe that is unnecessarily unfriendly to the user, though.

-Peff

[1] The one feature I would like in this vein is that editing the title
    in the instruction-sheet would modify the commit message of the
    relevant commit. For some reason I try to do this every few weeks,
    but of course the changes are just thrown away.

  reply	other threads:[~2014-02-26 10:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  8:04 GSoC idea: allow "git rebase --interactive" todo lines to take options Michael Haggerty
2014-02-26 10:52 ` Jeff King [this message]
2014-02-26 11:14   ` Michael Haggerty
2014-02-26 11:42     ` Jeff King
2014-02-26 14:55   ` Tay Ray Chuan
2014-02-26 19:55   ` Junio C Hamano
2014-02-27  7:48   ` Michael Haggerty
2014-02-27 18:10   ` Brandon McCaig
2014-02-28 12:52     ` Jeff King
2014-02-28 14:03       ` Michael Haggerty
2014-03-11  1:37         ` Jeff King
2014-03-11 19:31           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140226105249.GE25711@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=martin.von.zweigbergk@gmail.com \
    --cc=mhagger@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).