git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Steffen Prohaska <prohaska@zib.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v6] safecrlf: Add mechanism to warn about irreversible crlf conversions
Date: Sun, 03 Feb 2008 02:50:14 -0800	[thread overview]
Message-ID: <7vbq6yuxeh.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <12019685081997-git-send-email-prohaska@zib.de> (Steffen Prohaska's message of "Sat, 2 Feb 2008 17:08:28 +0100")

Steffen Prohaska <prohaska@zib.de> writes:

> CRLF conversion bears a slight chance of corrupting data.
> ...
> thing to do, while for binary file it corrupts data.

The above 25-line or so are well written and deserve to be in
the end user documentation somewhere, I think, to explain why it
is a good idea to have these warnings to them..

> This commit modifies git apply to fail even if safecrlf=warn,
> because git apply writes its changes back to the work tree
> immediately.  The user would not have a chance to backup the old
> version of the file if only a warning was printed.

I do not get this logic at all.

The whole point of git-apply is to apply the patch.  If you say
--whitespace=fix and some contents (say one of the testsuite
files in our t/ directory) needed to keep trailing newline, you
obviously are left with a broken result, and you would recover
by checking it out from index or HEAD and reapply.  Why
shouldn't the same principle hold here?

I haven't looked at the code of this round yet, but I promise I
will.

  reply	other threads:[~2008-02-03 10:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-02 16:08 [PATCH v6] safecrlf: Add mechanism to warn about irreversible crlf conversions Steffen Prohaska
2008-02-03 10:50 ` Junio C Hamano [this message]
2008-02-03 14:36   ` Steffen Prohaska
2008-02-03 15:42     ` [PATCH v7] " Steffen Prohaska
2008-02-03 22:29       ` Johannes Schindelin
2008-02-04  4:35         ` Steffen Prohaska
2008-02-04  4:42           ` [PATCH] [v8] " Steffen Prohaska
2008-02-04 15:02             ` Johannes Schindelin
2008-02-04 16:43               ` Steffen Prohaska
2008-02-04 17:27                 ` Johannes Schindelin
2008-02-06  8:33             ` Junio C Hamano
2008-02-06 11:23               ` Steffen Prohaska
2008-02-06 11:25               ` [PATCH] [v9] " Steffen Prohaska
2008-02-06 19:42                 ` Junio C Hamano
2008-02-06 20:35                   ` Steffen Prohaska
2008-02-04 15:01           ` [PATCH v7] " Johannes Schindelin
2008-02-03 22:53     ` [PATCH v6] " Junio C Hamano

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=7vbq6yuxeh.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.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 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).