You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,53 @@ Need to do something in your Git editor? Quickly shell out to your editor, make
76
76
77
77

78
78
79
+
### Advanced Features
80
+
81
+
#### Modified line exec command
82
+
83
+
This optional feature allows for the injection of an `exec` action after modified lines, where modified is determined as a changed action, command, or reference. This can be used to amend commits to update references in the commit message or run a test suite only on modified commits.
84
+
85
+
To enable this option, set the `interactive-rebase-tool.postModifiedLineExecCommand` option, providing an executable or script.
The first argument provided to the script will always be the action performed. Then, depending on the action, the script will be provided a different set of arguments.
98
+
99
+
For `drop`, `fixup`, `edit`, `pick`, `reword` and `squash` actions, the script will additionally receive the original commit hash, for `exec` the original and new commands are provided, and for `label`, `reset`, `merge`, and `update-ref` the original label/reference and new label/reference are provided.
100
+
101
+
Full example of a resulting rebase todo file, assuming that `interactive-rebase-tool.postModifiedLineExecCommand` was set to `script.sh`.
0 commit comments