From: Michael Haggerty <mhagger@alum.mit.edu>
To: git discussion list <git@vger.kernel.org>
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: GSoC idea: allow "git rebase --interactive" todo lines to take options
Date: Wed, 26 Feb 2014 09:04:30 +0100 [thread overview]
Message-ID: <530DA00E.4090402@alum.mit.edu> (raw)
I just submitted the idea below as a pull request [1] to the GSoC ideas
page, but I'd like to get some mailing list feedback first that the idea
is sensible...
And, is there anybody else willing to volunteer as a mentor for this
project? (There should be at least two.)
Michael
[1] https://github.com/git/git.github.io/pull/5
## Line options for `git rebase --interactive`
One of the more powerful features in Git is the command `git rebase
--interactive`, which allows recent commits to be reordered, squashed
together, or even revised completely. The command creates a todo list
and opens it in an editor. The original todo list might look like:
pick deadbee Implement feature XXX
pick c0ffeee The oneline of the next commit
pick 01a01a0 This change is questionable
pick f1a5c00 Fix to feature XXX
pick deadbab The oneline of the commit after
The user can edit the list to make changes to the history, for example
to
pick deadbee Implement feature XXX
squash f1a5c00 Fix to feature XXX
exec make
edit c0ffeee The oneline of the next commit
pick deadbab The oneline of the commit after
This would cause commits `deadbee` and `f1a5c00` to be squashed
together into one commit followed by running `make` to test-compile
the results, delete commit `01a01a0` altogether, and stop after
committing commit `c0ffeee` to allow the user to make changes.
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
* 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
The goal of this project would be (1) to add the infrastructure for
handling options on todo-list lines, and (2) implement some concrete
options. A big part of the difficulty of this project is that `git
rebase --interactive` is implemented via a sparsely-commented shell
script. Adding comments and cleaning up the script as you go would be
very welcome.
- Language: sh
- Difficulty: medium
- Possible mentors: Michael Haggerty
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
next reply other threads:[~2014-02-26 8:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 8:04 Michael Haggerty [this message]
2014-02-26 10:52 ` GSoC idea: allow "git rebase --interactive" todo lines to take options Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=530DA00E.4090402@alum.mit.edu \
--to=mhagger@alum.mit.edu \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=martin.von.zweigbergk@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).