gcfg
gcfg copied to clipboard
Escaped characters in unquoted values
The go-git
project uses a forked version gcfg
to parse Git .config
files. We have recently hit a case that was not handled in a way that is compatible with the parser in Git itself - values that use '\' escaping without quotes around it:
[remote "origin"]
url = E:\\Git\\emclient\\emclient.git
I don't know whether that is actually a standard for INI files or not, but in go-git
it has to be handled for compatibility reasons. I have submitted a PR at https://github.com/src-d/gcfg/pull/1, so you can take a look.
Thanks for the heads up. It seems like in this scenario it would make sense to do what git config does. Will look into implementing it (and your PR) when I have a bit of time.
On Thu, Oct 4, 2018, 4:31 PM Filip Navara [email protected] wrote:
The go-git project uses a forked version gcfg to parse Git .config files. We have recently hit a case that was not handled in a way that is compatible with the parser in Git itself - values that use '' escaping without quotes around it:
[remote "origin"] url = E:\Git\emclient\emclient.git
I don't know whether that is actually a standard for INI files or not, but in go-git it has to be handled for compatibility reasons. I have submitted a PR at src-d#1 https://github.com/src-d/gcfg/pull/1, so you can take a look.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/go-gcfg/gcfg/issues/15, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbhgUSUWa2bgm6U6ye30poQITMdUE-Eks5uhhu-gaJpZM4XIPQa .