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

Re: [PATCH 1/2] rebase -i: reword in-editor documentation of "exec"

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 20, 2011, 20:09 UTC
Message-ID
<20110120200949.GB11702@burratino>
In-Reply-To
<vpq39otrvmk.fsf@bauges.imag.fr>
Matthieu Moy wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 13 quoted lines
>> -#  x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
>> +#  x, exec = run command using shell, and stop if it fails
>
> I don't think this is a good change to remove the <cmd> part. All
> other commands are used with
>
> <command> <sha1> <subject line>
>
> and I don't think the user would be able to guess that exec is
> different without a hint.
> 
> If the problem is the wording of the sentence that may imply that
> <cmd> should be the shell itself, then why not

Yes, sorry, I combined two problems into a single patch. That was a mistake. The current cheat sheet says:

# Rebase 3f14246..a1d7e01 onto 3f14246 # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. #

This does not make it clear that the format of each line is
	<instruction> <commit id> <explanatory text that will be printed>

but the reader will probably infer that from the automatically generated pick examples above.

What about the "exec" instruction? By analogy, I might imagine that the format of that line is

	exec <command> <explanatory text that will be printed>

So the "<cmd>" does not address that question for me. It does succeed in clarifying that "a shell command" does not mean an arbitrary shell command but a user-specified one.

Meanwhile, it makes the cheat sheet harder to visually scan as a table
 i, instruction = action performed by instruction

Maybe "exec" should be explained outside this table? For example, maybe something along the lines of

	 x, exec = run an arbitrary command (see below)
	A line of the form "exec <command>" will run <command> using your
	shell and stop for investigation or amending if the command fails.
	If you remove a line here, THAT COMMIT WILL BE LOST.
	However, if you remove everything, the rebase will be aborted.
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 38 in “Black smoke from git rebase -i exec”
  1. Ævar Arnfjörð BjarmasonAug 10, 2010
  2. Matthieu MoyAug 10, 2010
  3. Ævar Arnfjörð BjarmasonAug 10, 2010
  4. Johannes SixtAug 10, 2010
  5. Ævar Arnfjörð BjarmasonAug 10, 2010
  6. Matthieu MoyAug 10, 2010
  7. 1/2 rebase -i: add exec command to launch a shell commandMatthieu Moy, Aug 10, 2010
  8. Junio C HamanoAug 11, 2010
  9. Matthieu MoyAug 12, 2010
  10. 0/2 rebase -i: in-editor documentation nitsJonathan Nieder, Jan 16, 2011
  11. 1/2 rebase -i: reword in-editor documentation of "exec"Jonathan Nieder, Jan 16, 2011
  12. Matthieu MoyJan 16, 2011
  13. Junio C HamanoJan 18, 2011
  14. Jonathan NiederJan 20, 2011
  15. Junio C HamanoJan 20, 2011
  16. 1/2 rebase -i: clarify in-editor documentation of "exec"Jonathan Nieder, Jan 21, 2011
  17. Matthieu MoyJan 21, 2011
  18. Jonathan NiederJan 21, 2011
  19. Matthieu MoyJan 21, 2011
  20. 2/2 rebase -i: explain how to discard all commitsJonathan Nieder, Jan 16, 2011
  21. 2/2 Re: rebase -i: explain how to discard all commitsNicolas Sebrecht, Jan 20, 2011
  22. Jonathan NiederJan 20, 2011
  23. 2/2 Re: rebase -i: explain how to discard all commitsNicolas Sebrecht, Jan 20, 2011
  24. Thomas RastJan 20, 2011
  25. Junio C HamanoJan 20, 2011
  26. Johannes SchindelinJan 21, 2011
  27. Documentation: suggest "reset --keep" to undo a commitJonathan Nieder, Jan 21, 2011
  28. Junio C HamanoJan 21, 2011
  29. Jonathan NiederJan 21, 2011
  30. Junio C HamanoJan 21, 2011
  31. Junio C HamanoJan 21, 2011
  32. Matthieu MoyJan 21, 2011
  33. Joshua JensenJan 21, 2011
  34. Documentation: do not treat reset --keep as a special caseJonathan Nieder, Jan 21, 2011
  35. Junio C HamanoJan 21, 2011
  36. Jay SoffianJan 26, 2011
  37. Johannes SchindelinJan 23, 2011
  38. 2/2 test-lib: user-friendly alternatives to test [-d|-f|-e]Matthieu Moy, Aug 10, 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.