git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] rebase--interactive: Add "sign" command

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 3, 2016, 14:31 UTC
Message-ID
<alpine.DEB.2.20.1608031621590.107993@virtualbox>
In-Reply-To
<20160803084743.3299-1-judge.packham@gmail.com>
Hi Chris,
On Wed, 3 Aug 2016, Chris Packham wrote:
> This is similar to the existing "reword" command in that it can be used
> to update the commit message the difference is that the editor presented
> to the user for the commit. It provides a useful shorthand for "exec git
> commit --amend --no-edit -s"

I can understand how this "sign" command helps you. I myself wished for new commands when working on my Git garden shears [*1*] (essentially, what git rebase --interactive --preserve-merges *should* have been).

My solution was to introduce a new fake editor that calls the real editor and afterwards converts the "new" commands into exec lines.

Having said that, this patch clashes seriously with my current effort to move a lot of the interactive rebase from shell into plain C. It is actually ready, but getting this into the code base is really slow-going, unfortunately.

Now, after looking at your patch it looks to me as if this would be easily ported, so there is not a big deal here.

However, I could imagine that we actually want this to be more extensible. After all, all you are doing is to introduce a new rebase -i command that does nothing else than shelling out to a command. Why not introduce a much more flexible feature, where you add something like "rebase -i aliases"?

Maybe something like this:
[rebase "command"]
	sign = git commit --amend -s --no-post-rewrite --no-edit -S

I have not completely thought this through, but maybe this direction would make the interactive rebase even more powerful?

Ciao, Johannes

Previous: Chris PackhamNext: Johannes Schindelin
Message 2 of 11 in “rebase--interactive: Add "sign" command”
  1. rebase--interactive: Add "sign" commandChris Packham, Aug 3, 2016
  2. Johannes SchindelinAug 3, 2016
  3. Johannes SchindelinAug 3, 2016
  4. Junio C HamanoAug 3, 2016
  5. Johannes SchindelinAug 3, 2016
  6. Jeff KingAug 3, 2016
  7. Chris PackhamAug 4, 2016
  8. Junio C HamanoAug 4, 2016
  9. Johannes SchindelinAug 5, 2016
  10. Chris PackhamAug 4, 2016
  11. Junio C HamanoAug 3, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.