From 5b09a46944f164781c148cc61655dc1a8392189a Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 6 Oct 2008 21:00:58 +0200 Subject: [PATCH] Make GIT_CONFIG only contain the config subcommand --- configure.ac | 8 ++++---- tig.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 6b0fc45..b179389 100644 --- a/configure.ac +++ b/configure.ac @@ -24,11 +24,11 @@ AM_ICONV AC_PROG_CC AC_CHECK_PROG(GIT, [git], [git], [AC_ERROR([git not found])]) -AC_MSG_CHECKING([which config command git supports]) -GIT_CONFIG="git repo-config" -git config --list >/dev/null && GIT_CONFIG="git config" +AC_MSG_CHECKING([which config subcommand git supports]) +GIT_CONFIG="repo-config" +git config --list >/dev/null && GIT_CONFIG="config" AC_MSG_RESULT([$GIT_CONFIG]) -AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config program]) +AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config subcommand]) AC_CHECK_PROGS(ASCIIDOC, [asciidoc false]) AC_CHECK_PROGS(XMLTO, [xmlto false]) diff --git a/tig.c b/tig.c index 4f21c3d..25fb237 100644 --- a/tig.c +++ b/tig.c @@ -114,7 +114,7 @@ static bool prompt_yesno(const char *prompt); #define NULL_ID "0000000000000000000000000000000000000000" #ifndef GIT_CONFIG -#define GIT_CONFIG "git config" +#define GIT_CONFIG "config" #endif #define TIG_LS_REMOTE \ @@ -5834,7 +5834,7 @@ read_repo_config_option(char *name, size_t namelen, char *value, size_t valuelen static int load_git_config(void) { - return read_properties(popen(GIT_CONFIG " --list", "r"), + return read_properties(popen("git " GIT_CONFIG " --list", "r"), "=", read_repo_config_option); } -- 2.30.2