diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-03-13 21:11:22 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-14 14:24:16 -0700 |
commit | 01017dce5469660191f926e35a3d9e88cbcb8537 (patch) | |
tree | 9f50b31015bc1cca133754730249cef2e3542793 /mru.c | |
parent | t1309: test read_early_config() (diff) | |
download | tgif-01017dce5469660191f926e35a3d9e88cbcb8537.tar.xz |
setup_git_directory_gently_1(): avoid die()ing
This function now has a new caller in addition to setup_git_directory():
the newly introduced discover_git_directory(). That function wants to
discover the current .git/ directory, and in case of a corrupted one
simply pretend that there is none to be found.
Example: if a stale .git file exists in the parent directory, and the
user calls `git -p init`, we want Git to simply *not* read any
repository config for the pager (instead of aborting with a message that
the .git file is corrupt).
Let's actually pretend that there was no GIT_DIR to be found in that case
when being called from discover_git_directory(), but keep the previous
behavior (i.e. to die()) for the setup_git_directory() case.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'mru.c')
0 files changed, 0 insertions, 0 deletions