Code

Fixed spurious "/bin/sh: --list: command not found" error
authorPeter Karlsson <peter@softwolves.pp.se>
Tue, 18 Mar 2008 08:42:24 +0000 (09:42 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Wed, 19 Mar 2008 20:47:39 +0000 (21:47 +0100)
If git has been installed with a separate libexecdir which is not in path
(for example, a standard msysgit installation), tig would not find
"git-config", and we must instead find the "git" binary and call it as
"git config".

Signed-off-by: Peter Karlsson <peter@softwolves.pp.se>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
configure.ac

index 55d81a98811306f99a733084d2e2f5ab9c3fdc41..422039eb4876c71e57c45705140bbc43cdb26ca9 100644 (file)
@@ -10,6 +10,10 @@ AM_ICONV
 
 AC_PROG_CC
 AC_CHECK_PROGS(GIT_CONFIG, [git-config git-repo-config])
+if test "${ac_cv_prog_GIT_CONFIG}" = ""; then
+  AC_CHECK_PROGS(GIT, [git])
+  GIT_CONFIG="${ac_cv_prog_GIT} config"
+fi
 AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config program])
 AC_CHECK_PROGS(ASCIIDOC, [asciidoc false])
 AC_CHECK_PROGS(XMLTO, [xmlto false])