You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds the `-z`/`--null` and `--name-only` options in the `git`
invocation that tries to obtain the configuration file path
associated with the `git` installation itself. The benefits are:
- Parsing is more reliable for paths containing unusual characters,
because `-z`/`--null` causes all paths to be output literally.
Previously, `"` characters were trimmed from the ends, but this
would not always extract a correct path, because when a path
contains characters that cause `git` to enclose it in double
quotes, those characters are usually represented in a symbolic
form, usually with `\` escapes.
In some scenarios, such as usually on Windows when the escaped
character is itself a `\` and not in the leading position, the
mangled path would be usable, but more often it would not.
- The volume of output is less, because `--name-only` casues values
not to be included in the output.
- The combination of `-z`/`--null` and `--name-only` makes the
output format simpler, and the parsing logic is accordingly
simpler.
`git` has supported the `-z`/`--null` and `--name-only` options
even before support for `--show-origin` was added in Git 2.8.0, so
this change should have no effect on Git version compatibility.
0 commit comments