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 14:53:11 -0800 [thread overview]
Message-ID: <7vejbtsld4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 4C024D67-9FA5-451D-BB91-CE9464C6F50D@zib.de
Steffen Prohaska <prohaska@zib.de> writes:
>> 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?
>
> You are right. All files should be committed before running
> git apply and therefore the original files can be recovered by
> git checkout. Hmm ... so apply should either just warn or be
> completely quiet as git blame is? I think it should warn.
I agree that warning is needed if the setting says "warn".
Of course, it could become part of an irreversible action if you
did this:
$ git commit ;# or whatever. Now there is no local mods
$ git apply <patch-1
$ edit ;# to fix things up
$ git apply <patch-2
and if you get the warning from patch-2.
But the safecrlf warning is primarily about a misdetection of
binaryness, so I do not think this sequence is not something we
would even want to worry about.
prev parent reply other threads:[~2008-02-03 22:54 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
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 ` Junio C Hamano [this message]
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=7vejbtsld4.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).