Closed targos closed 2 years ago
This could use some more manual testing.
I tested locally with:
EDITOR=vim
-> Vim is opened, I can edit the message and when I save & close, the process continues with my message.
EDITOR=bad
:
do you want to amend the commit message? Yes
--------------------------------- New Message ----------------------------------
meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/40392
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
--------------------------------------------------------------------------------
? Use this message? No
/bin/sh: bad: command not found
Failed to edit the message using the configured editor
Please manually edit /Users/targos/git/nodejs/node/.ncu/40392/6830c70b2edb-message, then run
`git commit --amend -F /Users/targos/git/nodejs/node/.ncu/40392/6830c70b2edb-message` to finish amending the message
/cc @joyeecheung
Maybe we should do exactly like Git and also check for GIT_EDITOR
and the core.editor
config first?
Taking the git configs into account SGTM
I added support for GIT_EDITOR
and git config core.editor
.
I also tried with export EDITOR="code-insiders --wait"
but that doesn't work and I have no idea why.
The main process just exits with code 1 and no output in the console.
Fixed!
Tested with
export GIT_EDITOR=vim
git config core.editor "code-insiders --wait"
export EDITOR="subl -n -w"
/cc some people who land commits on a regular basis: @Trott @aduh95 @mhdawson @lpinca
Ping. I'd be really happy to have this feature :)
Speaking of which, would it make sense to add tests for these options?
I think we'd have to create some kind of infra for testing git node in general first - testing silent runs with --yes would be easier but testing interactive runs like this one requires would be difficult.
Speaking of which..have you tried running this with --yes and --autorebase? @targos
Speaking of which..have you tried running this with --yes and --autorebase?
Yes, no problem with those options.
Codecov Report
63.33% <20.00%> (-21.67%)
18.00% <0.00%> (ø)
61.53% <0.00%> (ø)
Continue to review full report at Codecov.