smashwilson / merge-conflicts

Resolve git merge conflicts in Atom
https://atom.io/packages/merge-conflicts
MIT License
432 stars 42 forks source link

Error when using merge-conflicts on files with Windows UNC path #204

Closed jolsen71 closed 8 years ago

jolsen71 commented 8 years ago

I'm running into an issue while trying to use merge-conflicts and I'm hoping someone might be able to advise a solution or work-around. I'm running Atom on a Windows 10 machine and editing files over a Windows mount, using DOS/Windows UNC path, such as: \\servername\path\to\file.txt

Everything I've done up until now outside of merge-conflicts works great in the editor (git status coloring in file tree, loading/saving, syntax highlighting, linters) but when I tried today to use to run merge-conflicts:detect for the first time, I get the following error message:

abnormal git exit: 128 '\servername\path\to' CMD.EXE was started 
with the above path as the current directory. UNC paths are not supported. 

I noticed the path reported in the error message is missing one of the leading backslashes, so perhaps backslashes need to be escaped before attempting to invoke the shell, at least on Windows machines. However, the error message seems to indicate something appeared to detect it was a UNC path, so maybe escaping isn't the issue.

Other plugins, such as linter, that execute external programs to parse files over the mount, as well as whatever Atom does with the file tree to colorize files and folders according to their status in the git repository works wine over the mount, as well.

Does anyone have any ideas, other than mapping the Windows UNC path to a drive letter, for getting merge-conflict (or its dependencies) to work with a Windows UNC path?

Thank you for your time.

jolsen71 commented 8 years ago

I was able to work around this issue by adding this registry entry:

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor] "DisableUNCCheck"=dword:00000001

Marking this closed.