diff options
author | Petr Baudis <pasky@ucw.cz> | 2005-05-11 02:00:49 +0200 |
---|---|---|
committer | Petr Baudis <xpasky@machine.sinus.cz> | 2005-05-11 02:00:49 +0200 |
commit | f1a7eb36b017c62d9a007b6b8660bdeec3f94f97 (patch) | |
tree | 9d9c288e2db202401ffba37a1b921f4244a79b2b /diff.c | |
parent | 883550481f885ab2865ab71819167230d21d4c14 (diff) | |
parent | b790abb874890926e4cfda552bfa89d1d4ff972b (diff) | |
download | git-f1a7eb36b017c62d9a007b6b8660bdeec3f94f97.tar.gz |
Merge with http://members.cox.net/junkio/git-jc.git
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4,14 +4,15 @@ #include <sys/types.h> #include <sys/wait.h> #include <signal.h> +#include <limits.h> #include "cache.h" #include "diff.h" -static char *diff_opts = "-pu"; +static const char *diff_opts = "-pu"; static const char *external_diff(void) { - static char *external_diff_cmd = NULL; + static const char *external_diff_cmd = NULL; static int done_preparing = 0; if (done_preparing) @@ -25,11 +26,11 @@ static const char *external_diff(void) * * GIT_DIFF_OPTS="-c"; */ - if (getenv("GIT_EXTERNAL_DIFF")) - external_diff_cmd = getenv("GIT_EXTERNAL_DIFF"); + if (gitenv("GIT_EXTERNAL_DIFF")) + external_diff_cmd = gitenv("GIT_EXTERNAL_DIFF"); /* In case external diff fails... */ - diff_opts = getenv("GIT_DIFF_OPTS") ? : diff_opts; + diff_opts = gitenv("GIT_DIFF_OPTS") ? : diff_opts; done_preparing = 1; return external_diff_cmd; |