I suppose this is to be considered a bug: I have to call smerge
from the command line from the directory of my repository in order to get a correct behaviour - especially when I run pre-commit-hooks. This should possibly be easy to fix.
Solved: Environment (?)
Pre-commit hooks work differently in SM and terminal
This should be solved by dev build 1059 (https://www.sublimemerge.com/dev). Currently that requires a license, however the plan is to open up dev builds, for the near future, to all users with the next dev build.
Thanks a lot - I will change my install from stable to dev for now. I am so excited having learnt about Sublime Merge today, that I already bought a license although I so far have never used any GUI tool for git. It’s probably mindless, but it looks great and I am sure that I will love that tool even more in the long run.
I still have to invoke smerge
(build 1060 - with license) from the command line, because else the pre-commit
hook will fail. It’s a pretty complex pre-commit
hook though, running GrumPHP
in a docker
container.
It runs fine if I run the exact same git commit command (per copy & paste) that smerge
uses from the command line, but it fails when I don’t start smerge
from the command line (didn’t try other directories than the repository one yet) but from the Unity launcher…
I take it from your most recent comment that you are on Linux?
In that case the issue is likely the difference between the environment in your terminal and that unity launches with. I think https://askubuntu.com/questions/326569/add-directories-to-path-without-repeating-yourself may have a solution for you. It looks like either setting up your env vars in ~/.profile
(as long as you don’t use zsh) or ~/.pam_environment
may be your best bet.
Dear wbond, that did the trick. I am very grateful for your advice, especially since this is not at all related to Sublime Merge. It also solves the issues I had with Sublime Text
Sublime Merge and githooks