From 36adb4abbdf809371b88581c8bf7fe9ea9a5b00a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 7 Mar 2009 16:51:33 +0100 Subject: MinGW: fix diff --no-index /dev/null ... When launching "diff --no-index" with a parameter "/dev/null", the MSys bash converts the "/dev/null" to a "nul", which usually makes sense. But Signed-off-by: Junio C Hamano --- diff-no-index.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'diff-no-index.c') diff --git a/diff-no-index.c b/diff-no-index.c index 0a14268ba9..598687b50a 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -38,6 +38,10 @@ static int get_mode(const char *path, int *mode) if (!path || !strcmp(path, "/dev/null")) *mode = 0; +#ifdef _WIN32 + else if (!strcasecmp(path, "nul")) + *mode = 0; +#endif else if (!strcmp(path, "-")) *mode = create_ce_mode(0666); else if (lstat(path, &st)) -- cgit v1.2.3