@matheusbsbs / matheus-bagliano / commits / f8babc4dab
Fork 0

rebase -i: support single-letter abbreviations for the actions

When you do many rebases, you can get annoyed by having to type out the actions "edit" or "squash" in total. This commit helps that, by allowing you to enter "e" instead of "edit", "p" instead of "pick", or "s" instead of "squash". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Sep 29, 2007 at 03:32 UTC f8babc4dabebebd9e95537df6da0408c1c178615
1 file changed +4 -4
git-rebase--interactive.sh
+4 -4
@@ -232,14 +232,14 @@ do_next () {
232 '#'*|'')
233 mark_action_done
234 ;;
235 - pick)
235 + pick|p)
236 comment_for_reflog pick
237
238 mark_action_done
239 pick_one $sha1 ||
240 die_with_patch $sha1 "Could not apply $sha1... $rest"
241 ;;
242 - edit)
242 + edit|e)
243 comment_for_reflog edit
244
245 mark_action_done
@@ -254,7 +254,7 @@ do_next () {
254 warn
255 exit 0
256 ;;
257 - squash)
257 + squash|s)
258 comment_for_reflog squash
259
260 has_action "$DONE" ||
@@ -263,7 +263,7 @@ do_next () {
263 mark_action_done
264 make_squash_message $sha1 > "$MSG"
265 case "$(peek_next_command)" in
266 - squash)
266 + squash|s)
267 EDIT_COMMIT=
268 USE_OUTPUT=output
269 cp "$MSG" "$SQUASH_MSG"