OSDN Git Service

mailinfo: read local configuration
authorJunio C Hamano <gitster@pobox.com>
Tue, 22 Nov 2016 21:13:16 +0000 (13:13 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 Nov 2016 21:13:16 +0000 (13:13 -0800)
commit3f0ec0687d95e0f53c899f964d769ca1846874da
treeb901b420c13d6839b577ce04b0f51d2a37feb903
parent1310affe024fba407bff55dbe65cd6d670c8a32d
mailinfo: read local configuration

Since b9605bc4f2 ("config: only read .git/config from configured
repos", 2016-09-12), we do not read from ".git/config" unless we
know we are in a repository.  "git mailinfo" however didn't do the
repository discovery and instead relied on the old behaviour.  This
was mostly OK because it was merely run as a helper program by other
porcelain scripts that first chdir's up to the root of the working
tree.

Teach the command to run a "gentle" version of repository discovery
so that local configuration variables like mailinfo.scissors are
honoured.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mailinfo.c
git.c
t/t5100-mailinfo.sh