summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorPetr Baudis <pasky@ucw.cz>2005-05-11 02:00:49 +0200
committerPetr Baudis <xpasky@machine.sinus.cz>2005-05-11 02:00:49 +0200
commitf1a7eb36b017c62d9a007b6b8660bdeec3f94f97 (patch)
tree9d9c288e2db202401ffba37a1b921f4244a79b2b /diff.c
parent883550481f885ab2865ab71819167230d21d4c14 (diff)
parentb790abb874890926e4cfda552bfa89d1d4ff972b (diff)
downloadgit-f1a7eb36b017c62d9a007b6b8660bdeec3f94f97.tar.gz
Merge with http://members.cox.net/junkio/git-jc.git
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/diff.c b/diff.c
index 95488cdd9f..3230997122 100644
--- a/diff.c
+++ b/diff.c
@@ -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;