tests: local config file should be honored from subdirs of toplevel
authorJonathan Nieder <jrnieder@gmail.com>
Sat, 26 Jun 2010 19:25:37 +0000 (14:25 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jun 2010 17:31:17 +0000 (10:31 -0700)
When git is passed the --paginate option, starting up a pager requires
deciding what pager to start, which requires access to the core.pager
configuration. If --paginate is handled before searching for the
git dir, this configuration will be missed.

In other words, with --paginate and only with --paginate, any
repository-local core.pager setting is being ignored [*].

[*] unless the git directory is ./.git or GIT_DIR or GIT_CONFIG was
set explicitly.

Add a test to demonstrate this counterintuitive behavior. Noticed
while reading over a patch by Duy that fixes it.

Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Improved-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found