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
The tiny chance of a performance or robustness benefit is not worth
the complexity, because:
- Git, at least versions I've looked at, will avoid doing the
particular traversals that this stands to prevent, just from
`GIT_DIR`.
- This shouldn't be needed for correctness or security, since the
effect of `GIT_DIR` follows from the documentation (as well as
being tested on various versions).
- This amount of redundancy is hard to justify. Even if `GIT_DIR`
failed to have the desired effect, the protection in any recent
or otherwise properly patched versions of Git should prevent a
malicious repository at a location like `C:\` from affecting
the configuration gleaned (or any `git` behavior).
- Besides the complexity of the code, there is also the complexity
of satisfying oneself that it really is acceptable to *clobber*
existing configuration of ceiling directories, in the particular
situation we are in. Of course, this could be avoided by
prepending it and a `;` (which is the separator on Windows). But
that would potentially worsen a situation where, if used, the
entries take time for Git to canonicalize due to a slow
fileystem.
This commit is mostly just a revert of the previous commit, but it
does also adjust some comments in light of further insights, to
avoid suggesting benefits that are not known to pertain, and to
mention the case of a nonexistent current directory.
0 commit comments