]> git.ipfire.org Git - thirdparty/git.git/commit - setup.c
setup: add gentle version of read_gitfile
authorErik Elfström <erik.elfstrom@gmail.com>
Tue, 9 Jun 2015 18:24:35 +0000 (20:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Jun 2015 19:29:22 +0000 (12:29 -0700)
commita93bedada88dc15b0143708e1cb87c8fe9b9c705
treeb9e64e6c52f9c745a6718a8d8e74d45035213cb1
parent7974889a053574e449b55ca543a486e38e74864f
setup: add gentle version of read_gitfile

read_gitfile will die on most error cases. This makes it unsuitable
for speculative calls. Extract the core logic and provide a gentle
version that returns NULL on failure.

The first usecase of the new gentle version will be to probe for
submodules during git clean.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Erik Elfström <erik.elfstrom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
setup.c