diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-12-27 11:16:21 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-12-27 11:16:21 -0800 |
| commit | 0da2ba4880f971de2782f2d4cfcd68f9148d2860 (patch) | |
| tree | 9b41bf3307485678a5f8e6932dc90bd0349e539b /git-rebase--interactive.sh | |
| parent | 720b1764def1cfd67004d917ec954df20983e6bb (diff) | |
| parent | ee5462d6e71aad04628ccb8f078784468bfa4139 (diff) | |
| download | git-0da2ba4880f971de2782f2d4cfcd68f9148d2860.tar.xz | |
Merge branch 'lb/rebase-i-short-command-names'
With a configuration variable rebase.abbreviateCommands set,
"git rebase -i" produces the todo list with a single-letter
command names.
* lb/rebase-i-short-command-names:
sequencer.c: drop 'const' from function return type
t3404: add test case for abbreviated commands
rebase -i: learn to abbreviate command names
rebase -i -x: add exec commands via the rebase--helper
rebase -i: update functions to use a flags parameter
rebase -i: replace reference to sha1 with oid
rebase -i: refactor transform_todo_ids
rebase -i: set commit to null in exec commands
Documentation: use preferred name for the 'todo list' script
Documentation: move rebase.* configs to new file
Diffstat (limited to 'git-rebase--interactive.sh')
| -rw-r--r-- | git-rebase--interactive.sh | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 437815669f..e3f5a0abf3 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -722,27 +722,6 @@ collapse_todo_ids() { git rebase--helper --shorten-ids } -# Add commands after a pick or after a squash/fixup series -# in the todo list. -add_exec_commands () { - { - first=t - while read -r insn rest - do - case $insn in - pick) - test -n "$first" || - printf "%s" "$cmd" - ;; - esac - printf "%s %s\n" "$insn" "$rest" - first= - done - printf "%s" "$cmd" - } <"$1" >"$1.new" && - mv "$1.new" "$1" -} - # Switch to the branch in $into and notify it in the reflog checkout_onto () { GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION: checkout $onto_name" @@ -982,7 +961,7 @@ fi test -s "$todo" || echo noop >> "$todo" test -z "$autosquash" || git rebase--helper --rearrange-squash || exit -test -n "$cmd" && add_exec_commands "$todo" +test -n "$cmd" && git rebase--helper --add-exec-commands "$cmd" todocount=$(git stripspace --strip-comments <"$todo" | wc -l) todocount=${todocount##* } |
