From: Jonas Fonseca Date: Mon, 6 Oct 2008 19:00:58 +0000 (+0200) Subject: Make GIT_CONFIG only contain the config subcommand X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5b09a46944f164781c148cc61655dc1a8392189a;p=tig.git Make GIT_CONFIG only contain the config subcommand --- 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); }