Re: [PATCH v5 04/11] setup_git_directory_1(): avoid changing global state

2017-03-10 Thread Junio C Hamano
Johannes Schindelin writes: > /* > * We cannot decide in this function whether we are in the work tree or > * not, since the config can only be read _after_ this function was called. > + * > + * Also, we avoid changing any global state (such as the current

[PATCH v5 04/11] setup_git_directory_1(): avoid changing global state

2017-03-09 Thread Johannes Schindelin
For historical reasons, Git searches for the .git/ directory (or the .git file) by changing the working directory successively to the parent directory of the current directory, until either anything was found or until a ceiling or a mount point is hit. Further global state may be changed in case