All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: git@vger.kernel.org, Steffen Prohaska <prohaska@zib.de>
Subject: Re: [PATCH] treat any file with NUL as binary
Date: Tue, 15 Jan 2008 17:21:41 -0800	[thread overview]
Message-ID: <7vr6gibm56.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1200407309-10992-1-git-send-email-dpotapov@gmail.com> (Dmitry Potapov's message of "Tue, 15 Jan 2008 17:28:29 +0300")

Dmitry Potapov <dpotapov@gmail.com> writes:

> There are two heuristics in Git to detect whether a file is binary
> or text. One in xdiff-interface.c relied on existing NUL byte at

"relies on" (not past tense); we may want to say that it is
stolen from GNU diff to be compatible.

> the beginning. However, convert.c used a different heuristic, which
> relied that the number of non-printable symbols is less than 1%.
>
> Due to difference in approaches whether a file is binary or not,
> it was possible that a file that diff treats as binary will not be
> treated as text by CRLF conversation. This is very confusing for

"conversion".

> a user who seeing that 'git diff' shows file as binary expects it

"sees".

> to be added as binary.
>
> This patch makes is_binary to consider any file that contains at
> least one NUL character as binary.
> ---
>
> So, please, consider it for inclusion as a bug fix.

Please typofix and apply "s/.$/, to ensure that the heuristics
used for CRLF conversion is tighter than what is used by diff./"
or something like that at the end.

Also please add sign-off.  The patch looks correct.

  parent reply	other threads:[~2008-01-16  1:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15 14:28 [PATCH] treat any file with NUL as binary Dmitry Potapov
2008-01-15 21:03 ` Steffen Prohaska
2008-01-15 23:11 ` Junio C Hamano
2008-01-16  1:13   ` Dmitry Potapov
2008-01-16  1:16     ` Junio C Hamano
2008-01-16  1:21 ` Junio C Hamano [this message]
2008-01-16  1:59   ` Dmitry Potapov

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=7vr6gibm56.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=prohaska@zib.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.