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

Re: [PATCH] git-rebase--interactive.sh: Add new command "shell"

From
YDYann Dirson <ydirson@free.fr>
Date
Nov 8, 2010, 22:29 UTC
Message-ID
<20101108222937.GH3167@home.lan>
In-Reply-To
<663A3F43-5F64-41F0-B272-64EEE9775250@sb.org>
On Mon, Nov 08, 2010 at 01:49:44PM -0800, Kevin Ballard wrote:
Show 30 quoted lines
> On Nov 8, 2010, at 10:31 AM, Junio C Hamano wrote:
> 
> > Yann Dirson <ydirson@free.fr> writes:
> > 
> >> #  e, edit = use commit (if specified) but pause to amend/examine/test
> > 
> > When an end user is given
> > 
> >    pick one
> >    pick two
> >    pick three
> >    ...
> > 
> > and told the above, would it be crystal clear that, if he changed the insn
> > sheet to
> > 
> >    pick one
> >    edit
> >    pick three
> >    ...
> > 
> > then he will _lose_ the change made by foo, or will the user come back
> > here and complain that a precious change "two" is lost and it is git's
> > fault?
> 
> On the one hand, once someone understands what the todo list is actually
> doing, then it should be instantly obvious that removing the reference to
> a commit will remove that commit entirely. On the other hand, I agree it
> may be confusing to new git users (or new rebase users). Do you have an
> alternative solution in mind?
Maybe restating in an explanatory paragraph something like:
|Keep in mind that any commit in the original todo list, that would
|not be there after your edits, would not be included in the resulting
|rebased branch.  In case you realize afterwards that you need such a
|commit, you can still access it as an ancestor of @{1}, see
|git-reflog(1) for details.

Maybe we could list a copy of the todo list in the comments, as a reference for double-checking. Such a list could even be used for a final check before applying, that would ask confirmation if the set of patches has changed, and offer to edit again. The same config item (eg. advice.interactiveRebase ?) could be used to hide the note and the check.

Now making "rebase -i" possibly interactive may cause problems, for any porcelain scripts above it. Not sure it'd be the way to do it. Maybe add a "check" command to be inserted at bottom of todo list to activate it, that would be here by default but commented out ?

Previous: Kevin BallardNext: Jonathan Nieder
Message 25 of 39 in “git-rebase--interactive.sh: Add new command "shell"”
  1. git-rebase--interactive.sh: Add new command "shell"Kevin Ballard, Nov 4, 2010
  2. Kevin BallardNov 4, 2010
  3. Matthieu MoyNov 4, 2010
  4. Kevin BallardNov 4, 2010
  5. Ævar Arnfjörð BjarmasonNov 4, 2010
  6. Kevin BallardNov 4, 2010
  7. Ævar Arnfjörð BjarmasonNov 4, 2010
  8. Johannes SixtNov 4, 2010
  9. Erik Faye-LundNov 4, 2010
  10. Kevin BallardNov 4, 2010
  11. Yann DirsonNov 4, 2010
  12. Erik Faye-LundNov 4, 2010
  13. Eric RaibleNov 4, 2010
  14. Matthieu MoyNov 4, 2010
  15. Eric RaibleNov 4, 2010
  16. Jonathan NiederNov 4, 2010
  17. Yann DirsonNov 4, 2010
  18. Eric RaibleNov 4, 2010
  19. [PATCHv2] git-rebase--interactive.sh: extend "edit" command to be more usefulKevin Ballard, Nov 4, 2010
  20. Kevin BallardNov 4, 2010
  21. Johannes SixtNov 5, 2010
  22. Kevin BallardNov 5, 2010
  23. Junio C HamanoNov 8, 2010
  24. Kevin BallardNov 8, 2010
  25. Yann DirsonNov 8, 2010
  26. Jonathan NiederNov 10, 2010
  27. Kevin BallardNov 10, 2010
  28. Jonathan NiederNov 10, 2010
  29. Yann DirsonNov 10, 2010
  30. Matthieu MoyNov 10, 2010
  31. Jonathan NiederNov 10, 2010
  32. Kevin BallardNov 10, 2010
  33. [PATCHv3] git-rebase--interactive.sh: extend "edit" command to be more usefulKevin Ballard, Nov 24, 2010
  34. Jonathan NiederDec 3, 2010
  35. Kevin BallardDec 3, 2010
  36. Jonathan NiederDec 3, 2010
  37. Johannes SixtDec 3, 2010
  38. Jonathan NiederDec 3, 2010
  39. Kevin BallardDec 3, 2010

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.