]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
setup: introduce the discover_git_directory() function
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 13 Mar 2017 20:10:45 +0000 (21:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Mar 2017 21:24:16 +0000 (14:24 -0700)
commit16ac8b8db6ec7400719db6b5c76edaab33c47606
tree1af01aa31bafec1edaf37e125fbbad212d3b78e3
parentce9b8aab5d9a40a84b4868fa890654900ab2d4cc
setup: introduce the discover_git_directory() function

We modified the setup_git_directory_gently_1() function earlier to make
it possible to discover the GIT_DIR without changing global state.

However, it is still a bit cumbersome to use if you only need to figure
out the (possibly absolute) path of the .git/ directory. Let's just
provide a convenient wrapper function with an easier signature that
*just* discovers the .git/ directory.

We will use it in a subsequent patch to fix the early config.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
setup.c