Skip to content

Commit 960ac5f

Browse files
jrngitster
authored andcommitted
rebase -i: clarify in-editor documentation of "exec"
The hints in the current "instruction sheet" template look like so: # 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 <insn> <commit id> <explanatory text that will be printed> but the reader will probably infer that from the automatically generated pick examples above it. What about the "exec" instruction? By analogy, I might imagine that the format of that line is "exec <command> <explanatory text>", and the "x <cmd>" hint does not address that question (at first I read it as taking an argument <cmd> that is the name of a shell). Meanwhile, the mention of <cmd> makes the hints harder to scan as a table. So remove the <cmd> and add some words to remind the reader that "exec" runs a command named by the rest of the line. To make room, it is left to the manpage to explain that that command is run using $SHELL and that nonzero status from that command will pause the rebase. Wording from Junio. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a1231de commit 960ac5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ first and then run 'git rebase --continue' again."
997997
# e, edit = use commit, but stop for amending
998998
# s, squash = use commit, but meld into previous commit
999999
# f, fixup = like "squash", but discard this commit's log message
1000-
# x <cmd>, exec <cmd> = Run a shell command <cmd>, and stop if it fails
1000+
# x, exec = run command (the rest of the line) using shell
10011001
#
10021002
# If you remove a line here THAT COMMIT WILL BE LOST.
10031003
# However, if you remove everything, the rebase will be aborted.

0 commit comments

Comments
 (0)