git-config: handle --file option with relative pathname properly
commit1ae14a6b52f8f0506780cd361933f717163ae19b
authorGerrit Pape <pape@smarden.org>
Fri, 12 Oct 2007 11:32:51 +0000 (12 11:32 +0000)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 16 Oct 2007 01:07:38 +0000 (15 21:07 -0400)
tree6ef7947d657b4b0299a9ef0e40a48636f65a8f7b
parent60fcc2e6ce255da1baa92905c10456981d260fa0
git-config: handle --file option with relative pathname properly

When calling git-config not from the top level directory of a repository,
it changes directory before trying to open the config file specified
through the --file option, which then fails if the config file was
specified by a relative pathname.  This patch adjusts the pathname to
the config file if applicable.

The problem was noticed by Joey Hess, reported through
 http://bugs.debian.org/445208

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
builtin-config.c