All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] MinGW: fix diff --no-index /dev/null ...
Date: Sat, 7 Mar 2009 20:56:58 +0100	[thread overview]
Message-ID: <200903072056.58465.j6t@kdbg.org> (raw)
In-Reply-To: <dba002b9e521c639847650fbaeb8b87b66b9562e.1236441065u.git.johannes.schindelin@gmx.de>

On Samstag, 7. März 2009, Johannes Schindelin wrote:
> --- 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))

IMO this #ifdef is a reasonable compromise. Trying to move this into 
git-compat-util.h or mingw.h somehow would only obfuscate the code.

Tested-by: Johannes Sixt <j6t@kdbg.org>

-- Hannes

  reply	other threads:[~2009-03-07 19:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1236441065u.git.johannes.schindelin@gmx.de>
2009-03-07 15:51 ` [PATCH] MinGW: fix diff --no-index /dev/null Johannes Schindelin
2009-03-07 19:56   ` Johannes Sixt [this message]
2009-03-07 20:15   ` Junio C Hamano
2009-03-07 20:47     ` Johannes Schindelin
2009-03-07 21:40       ` Junio C Hamano
2009-03-07 21:18     ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200903072056.58465.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.