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
$ git rebase upstream/master -i -x "git node land --amend"
Error reading file, /Users/srl/src/node/.git/rebase-merge/git-rebase-todo
Reason: Invalid action: exec
Could not execute editor
It's not a bug with git-node because I got the same result with:
$ git rebase -i b -x /bin/date
Error reading file, /tmp/foo/.git/rebase-merge/git-rebase-todo
Reason: Invalid line: exec /bin/date
Could not execute editor
man git-rebase says:
-x <cmd>, --exec <cmd>
Append "exec <cmd>" after each line creating a commit in the final history. <cmd> will be interpreted as one or more
shell commands.
You may execute several commands by either using one instance of --exec with several commands:
git rebase -i --exec "cmd1 && cmd2 && ..."
or by giving more than one --exec:
git rebase -i --exec "cmd1" --exec "cmd2" --exec ...
If --autosquash is used, "exec" lines will not be appended for the intermediate commits, and will only appear at the end
of each squash/fixup series.
This uses the --interactive machinery internally, but it can be run without an explicit --interactive.
Sounds like the exec action needs to be supported by the editor.
exec has been on my wishlist for a while now, but it hasn't been requested until now. Eventually I would like the ability to modify the exec lines, but perhaps just allowing them would be a decent solution for now. I think the case in the linked issue from the node-core-utils would be okay then.
I've added basic support for the exec action in #69 . You can't modify the action, but you can re-order it. I feel like there may be a use case to have a re-order move the exec commands attached to another action, but if that's ever requested it would required something like #24 to be implemented first.
I should be releasing version 0.7 this weekend or sometime next week.
Activity
MitMaro commentedon Oct 24, 2018
Thanks for reporting this!
exechas been on my wishlist for a while now, but it hasn't been requested until now. Eventually I would like the ability to modify the exec lines, but perhaps just allowing them would be a decent solution for now. I think the case in the linked issue from the node-core-utils would be okay then.srl295 commentedon Oct 24, 2018
@MitMaro Just allowing them would be fine.
Also, this was a little hard to track down as to what was failing. Could you change the error message to:
then I'd see:
MitMaro commentedon Oct 28, 2018
I've added basic support for the
execaction in #69 . You can't modify the action, but you can re-order it. I feel like there may be a use case to have a re-order move the exec commands attached to another action, but if that's ever requested it would required something like #24 to be implemented first.I should be releasing version 0.7 this weekend or sometime next week.
Thanks again for the report!