From: Marc Strapetz <marc.strapetz@syntevo.com>
To: git@vger.kernel.org
Subject: git status internals and line endings
Date: Thu, 12 Nov 2009 21:32:14 +0100 [thread overview]
Message-ID: <4AFC70CE.5020106@syntevo.com> (raw)
I'm trying to figure out under which circumstances changes in line
endings are resulting in 'modified' status (resp. will be committed). I
have three files with the same content, differing only in line endings:
- file1 is committed with CRLF and has LF in working tree
- file2 is committed with CRLF and has CRLF in working tree
- file3 is committed with LF and has CRLF in working tree
On Linux, file1 and file3 are reported as modified -- as I would expect.
The surprise is on Windows: here only file1 is reported as modified. Why
not file3? Btw, 'git hash-object file3' reports the same SHA as for the
LF-only content in the repository (not so on Linux, as expected).
Is this some special handling on Windows (and possibly on Mac OS)? In
this case, can someone please point me to the corresponding code part?
Thanks for any comments regarding this topic.
--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com
next reply other threads:[~2009-11-12 20:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 20:32 Marc Strapetz [this message]
2009-11-13 0:15 ` git status internals and line endings Jeff King
2009-11-13 8:08 ` Marc Strapetz
2009-11-13 9:04 ` Erik Faye-Lund
2009-11-13 11:01 ` Marc Strapetz
2009-11-13 9:40 ` Peter Krefting
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=4AFC70CE.5020106@syntevo.com \
--to=marc.strapetz@syntevo.com \
--cc=git@vger.kernel.org \
/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