Open the-kenny opened 3 months ago
Root cause seems to be that GIT_EDITOR
is set to "${codePath}" --wait
, causing git (in the special_subfolder/
instance) to run code --wait ../.git/COMMIT_EDITMSG
. Vscode is smart and recognises this path belonging to the workspace for root/
and opens the file in the instance.
One workaround is to change the command to code --wait --reuse-window .
(the .
being the most relevant part) which should force vscode to open the path to COMMIT_EDITMSG
passed as the next argument in the instance for the current folder.
I'll try this locally and see if there are any unintended side effects and keep you updated.
I've been using my fix (https://github.com/kahole/edamagit/pull/302) on macOS for the last two weeks and it seems to work fine without any unintended side effects.
I'm working on a sort-of monorepo where I have multiple projects open in separate vscode windows. The setup is roughly the following:
Usually, two vscode instances are open: One for
root/
(to work onroot/
as well assubfolder1/
andsubfolder2/
) and one forspecial_subfolder/
.edamagit handles this fairly well: I can simultaneously use it in every window without major hiccups, with one issue:
When I run
magic.commit
in the vscode instance forspecial_subfolder/
,COMMIT_EDITMSG
is opened in the instance forroot/
, with everything else staying in the instance ofspecial_subfolder/
. I expectCOMMIT_EDITMSG
to open in the instancemagic.commit
is executed.Is there a configuration option I missed, or is this an unusual use case that isn't covered (yet)?
If you consider this a bug, would you accept a PR for a fix?