From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, gitster@pobox.com, Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCH] MinGW: fix diff --no-index /dev/null ...
Date: Sat, 07 Mar 2009 12:15:54 -0800 [thread overview]
Message-ID: <7v8wnhnl6t.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: dba002b9e521c639847650fbaeb8b87b66b9562e.1236441065u.git.johannes.schindelin@gmx.de
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> diff --git a/diff-no-index.c b/diff-no-index.c
> index 0a14268..598687b 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))
I had a brief "Huh? -- doesn't this call for an is_dev_null() helper"
moment, but I think you are right that diff-no-index.c is the right place
to special case it.
Should this go to 'maint'?
> diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh
> index 3cf5b5c..f64aa48 100755
> --- a/t/t4012-diff-binary.sh
> +++ b/t/t4012-diff-binary.sh
> @@ -87,7 +87,7 @@ nul_to_q() {
>
> test_expect_success 'diff --no-index with binary creation' '
> echo Q | q_to_nul >binary &&
> - (:# hide error code from diff, which just indicates differences
> + (: hide error code from diff, which just indicates differences
> git diff --binary --no-index /dev/null binary >current ||
> true
> ) &&
> --
> 1.6.2.327.g0fa6c
next prev parent reply other threads:[~2009-03-07 20:18 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
2009-03-07 20:15 ` Junio C Hamano [this message]
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=7v8wnhnl6t.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).