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

[PATCH v2 0/9] rebase -i: add config to abbreviate command names

From
Liam Beguin <liambeguin@gmail.com>
Date
Dec 5, 2017, 17:52 UTC
Message-ID
<20171205175235.32319-1-liambeguin@gmail.com>
In-Reply-To
<20171127045514.25647-1-liambeguin@gmail.com>
Hi everyone,

This series will add the 'rebase.abbreviateCommands' configuration option to allow `git rebase -i` to default to the single-letter command names when generating the todo list.

Using single-letter command names can present two benefits. First, it makes it easier to change the action since you only need to replace a single character (i.e.: in vim "r<character>" instead of "ciw<character>"). Second, using this with a large enough value of 'core.abbrev' enables the lines of the todo list to remain aligned making the files easier to read.

Changes in V2:
- Refactor and rename 'transform_todo_ids'
- Replace SHA-1 by OID in rebase--helper.c
- Update todo list related functions to take a generic 'flags' parameter
- Rename 'add_exec_commands' function to 'sequencer_add_exec_commands'
- Rename 'add-exec' option to 'add-exec-commands'
- Use 'strbur_read_file' instead of rewriting it
- Make 'command_to_char' return 'comment_char_line' if no single-letter
  command name is defined
- Combine both tests into a single test case
- Update commit messages
Changes in V2:
- Rename 'transform_todo_insn' to 'transform_todos'
- Fix flag name TODO_LIST_SHORTE{D,N}_IDS
Liam Beguin (9):
  Documentation: move rebase.* configs to new file
  Documentation: use preferred name for the 'todo list' script
  rebase -i: set commit to null in exec commands
  rebase -i: refactor transform_todo_ids
  rebase -i: replace reference to sha1 with oid
  rebase -i: update functions to use a flags parameter
  rebase -i -x: add exec commands via the rebase--helper
  rebase -i: learn to abbreviate command names
  t3404: add test case for abbreviated commands
 Documentation/config.txt        |  31 +-------
 Documentation/git-rebase.txt    |  19 +----
 Documentation/rebase-config.txt |  52 +++++++++++++
 builtin/rebase--helper.c        |  29 +++++---
 git-rebase--interactive.sh      |  23 +-----
 sequencer.c                     | 126 +++++++++++++++++++++-----------
 sequencer.h                     |  10 ++-
 t/t3404-rebase-interactive.sh   |  22 ++++++
 8 files changed, 186 insertions(+), 126 deletions(-)
 create mode 100644 Documentation/rebase-config.txt
-- 
2.15.1.280.g10402c1f5b5c
Previous: Johannes SchindelinNext: Liam Beguin
Message 59 of 70 in “rebase -i: add config to abbreviate command names”
  1. 0/5 rebase -i: add config to abbreviate command namesLiam Beguin, Nov 27, 2017
  2. 3/5 rebase -i: add exec commands via the rebase--helperLiam Beguin, Nov 27, 2017
  3. Junio C HamanoNov 27, 2017
  4. Johannes SchindelinNov 27, 2017
  5. Junio C HamanoNov 27, 2017
  6. liam BeguinNov 29, 2017
  7. Johannes SchindelinNov 27, 2017
  8. Junio C HamanoNov 27, 2017
  9. liam BeguinNov 29, 2017
  10. Johannes SchindelinNov 29, 2017
  11. 4/5 rebase -i: learn to abbreviate command namesLiam Beguin, Nov 27, 2017
  12. Junio C HamanoNov 27, 2017
  13. liam BeguinNov 29, 2017
  14. Johannes SchindelinNov 27, 2017
  15. Jeff KingNov 27, 2017
  16. liam BeguinNov 29, 2017
  17. liam BeguinNov 29, 2017
  18. Johannes SchindelinNov 29, 2017
  19. Junio C HamanoDec 3, 2017
  20. 5/5 t3404: add test case for abbreviated commandsLiam Beguin, Nov 27, 2017
  21. Junio C HamanoNov 27, 2017
  22. Johannes SchindelinNov 27, 2017
  23. 2/5 Documentation: use preferred name for the 'todo list' scriptLiam Beguin, Nov 27, 2017
  24. Johannes SchindelinNov 27, 2017
  25. 1/5 Documentation: move rebase.* configs to new fileLiam Beguin, Nov 27, 2017
  26. Johannes SchindelinNov 27, 2017
  27. Junio C HamanoNov 27, 2017
  28. liam BeguinNov 29, 2017
  29. 0/9 rebase -i: add config to abbreviate command namesLiam Beguin, Dec 3, 2017
  30. 1/9 Documentation: move rebase.* configs to new fileLiam Beguin, Dec 3, 2017
  31. 2/9 Documentation: use preferred name for the 'todo list' scriptLiam Beguin, Dec 3, 2017
  32. 5/9 rebase -i: replace reference to sha1 with oidLiam Beguin, Dec 3, 2017
  33. 4/9 rebase -i: refactor transform_todo_idsLiam Beguin, Dec 3, 2017
  34. Johannes SchindelinDec 4, 2017
  35. Junio C HamanoDec 4, 2017
  36. liam BeguinDec 5, 2017
  37. Junio C HamanoDec 5, 2017
  38. liam BeguinDec 5, 2017
  39. 7/9 rebase -i -x: add exec commands via the rebase--helperLiam Beguin, Dec 3, 2017
  40. 6/9 rebase -i: update functions to use a flags parameterLiam Beguin, Dec 3, 2017
  41. Johannes SchindelinDec 4, 2017
  42. Johannes SchindelinDec 4, 2017
  43. liam BeguinDec 5, 2017
  44. Junio C HamanoDec 5, 2017
  45. Kerry, RichardDec 5, 2017
  46. liam BeguinDec 5, 2017
  47. Junio C HamanoDec 5, 2017
  48. Kerry, RichardDec 5, 2017
  49. 3/9 rebase -i: set commit to null in exec commandsLiam Beguin, Dec 3, 2017
  50. 9/9 t3404: add test case for abbreviated commandsLiam Beguin, Dec 3, 2017
  51. 8/9 rebase -i: learn to abbreviate command namesLiam Beguin, Dec 3, 2017
  52. Duy NguyenDec 25, 2017
  53. Liam BeguinDec 25, 2017
  54. Duy NguyenDec 25, 2017
  55. Junio C HamanoDec 27, 2017
  56. Liam BeguinDec 27, 2017
  57. Junio C HamanoDec 28, 2017
  58. Johannes SchindelinDec 4, 2017
  59. 0/9 rebase -i: add config to abbreviate command namesLiam Beguin, Dec 5, 2017
  60. 1/9 Documentation: move rebase.* configs to new fileLiam Beguin, Dec 5, 2017
  61. 2/9 Documentation: use preferred name for the 'todo list' scriptLiam Beguin, Dec 5, 2017
  62. 3/9 rebase -i: set commit to null in exec commandsLiam Beguin, Dec 5, 2017
  63. 4/9 rebase -i: refactor transform_todo_idsLiam Beguin, Dec 5, 2017
  64. 5/9 rebase -i: replace reference to sha1 with oidLiam Beguin, Dec 5, 2017
  65. 7/9 rebase -i -x: add exec commands via the rebase--helperLiam Beguin, Dec 5, 2017
  66. 8/9 rebase -i: learn to abbreviate command namesLiam Beguin, Dec 5, 2017
  67. 6/9 rebase -i: update functions to use a flags parameterLiam Beguin, Dec 5, 2017
  68. 9/9 t3404: add test case for abbreviated commandsLiam Beguin, Dec 5, 2017
  69. Junio C HamanoDec 5, 2017
  70. liam BeguinDec 6, 2017

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.