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

Re: Heads up: major rebase -i -p rework coming up

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Jan 26, 2009, 16:10 UTC
Message-ID
<497DE08D.2030306@xiplink.com>
In-Reply-To
<alpine.DEB.1.00.0901242056070.14855@racer>
Johannes Schindelin wrote:
Show 5 quoted lines
> 
> - $sha1'
> 
> 	for merge and goto, if a $sha1 ends in a single quote, the 
> 	rewritten commit is substituted (if there is one)

I find this notation fairly unintuitive. I'm more inclined to let users specify their own names for important parts of the rebase.

I guess that's what Junio's 'mark' command is for, but not having seen a proper explanation of 'mark', I suggest instead a more inline method: an 'as' keyword. Any command in a todo script can be followed (on the same line, before the SHA1 value) with 'as <name>' allowing <name> to appear later in the script to refer to the result of the earlier command.

So the script in the example becomes
	pick as start A
	pick C
	pick as bottom D
	goto start
	pick B
	merge bottom was E

I find that much easier to understand. Especially when real SHA1 values are floating around everywhere, I think this notation will help users get things right.

This approach also allows a commit name "A" to consistently refer to the original commit, which I think also makes things easier for users.

		M.
Previous: Björn SteinbrinkNext: Stephen Haberman
Message 23 of 27 in “Heads up: major rebase -i -p rework coming up”
  1. Johannes SchindelinJan 24, 2009
  2. Junio C HamanoJan 24, 2009
  3. Johannes SchindelinJan 24, 2009
  4. Johannes SchindelinJan 24, 2009
  5. Junio C HamanoJan 24, 2009
  6. Johannes SchindelinJan 25, 2009
  7. Marc BranchaudJan 26, 2009
  8. Thomas RastJan 24, 2009
  9. Johannes SchindelinJan 25, 2009
  10. Johannes SchindelinJan 25, 2009
  11. Jakub NarebskiJan 25, 2009
  12. Johannes SchindelinJan 25, 2009
  13. Sverre RabbelierJan 25, 2009
  14. Johannes SchindelinJan 25, 2009
  15. Junio C HamanoJan 25, 2009
  16. Johannes SchindelinJan 25, 2009
  17. Jakub NarebskiJan 25, 2009
  18. Johannes SchindelinJan 25, 2009
  19. Nanako ShiraishiFeb 3, 2009
  20. Johannes SchindelinFeb 3, 2009
  21. Jakub NarebskiJan 25, 2009
  22. Björn SteinbrinkJan 25, 2009
  23. Marc BranchaudJan 26, 2009
  24. Stephen HabermanJan 27, 2009
  25. Johannes SchindelinJan 27, 2009
  26. Nanako ShiraishiJan 27, 2009
  27. Stephen HabermanJan 27, 2009

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.