]> git.ipfire.org Git - thirdparty/git.git/commit - config.c
git_config(): not having a per-repo config file is not an error
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 21 Feb 2009 00:48:55 +0000 (02:48 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Feb 2009 04:35:50 +0000 (20:35 -0800)
commitaa387407914a574d41df4d64328498d093337ccd
tree724fbea0a42d0cf829df0497ff6f21186cc8bedb
parent414f2e5337b0b78a47f021cb734e9ba4934c0b28
git_config(): not having a per-repo config file is not an error

Currently git_config() returns an error if there is no repo config file
available (cwd is not a git repo); it will correctly parse the system
and global config files, but still return an error.

It doesn't affect anything else since almost nobody is checking for the
return code (with the exception of 'git remote update').

A reorganization in 'git config' would benefit from being able to
properly detect errors in git_config() without the noise generated when
cwd is not a git repo.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c