git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git diff returns fatal error with core.safecrlf is set to true.
@ 2013-06-21 13:26 Yann Droneaud
  2013-06-21 15:44 ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Yann Droneaud @ 2013-06-21 13:26 UTC (permalink / raw)
  To: git

Hi,

Following my previous email "Tracking vendor release with Git" [1][2],
and the advice from Git users/developers, I'm trying to use 
.gitattributes
to handle CRLF/LF conversion.

While testing the behavor of Git regarding CRLF handling,
when core.safecrlf is set to true, I've found that "git diff" is 
returning
"fatal: CRLF would be replaced by LF" without returning any kind of 
diff.

This make me wonder if its the correct behavor for git diff to (only) 
fail:
It should be fatal for git add / git commit ( / git cherry-pick / ... 
?),
but non fatal for git diff.

According to the documentation git-config(5) [3]:
"Git will verify if a command modifies a file in the work tree either 
directly or indirectly"
I don't thing "git diff" is an operation that could modify a file.

Regards.

1. <1370970410-7935-1-git-send-email-ydroneaud@opteya.com>
2. <http://thread.gmane.org/gmane.comp.version-control.git/227466>
    <http://marc.info/?l=git&m=137097069115462&w=2>
3. https://www.kernel.org/pub/software/scm/git/docs/git-config.html

-- 
Yann Droneaud
OPTEYA

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-06-26 15:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 13:26 git diff returns fatal error with core.safecrlf is set to true Yann Droneaud
2013-06-21 15:44 ` Junio C Hamano
2013-06-21 21:57   ` Junio C Hamano
2013-06-24 12:42     ` Yann Droneaud
2013-06-24 18:19       ` Junio C Hamano
2013-06-24 21:48         ` Junio C Hamano
2013-06-25 20:29           ` Torsten Bögershausen
2013-06-26 15:48             ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).