From: "Torsten Bögershausen" <tboegi@web.de>
To: Frank Ammeter <git@ammeter.ch>, git@vger.kernel.org
Subject: Re: wrong handling of text git attribute leading to files incorrectly reported as modified
Date: Fri, 11 Apr 2014 22:38:44 +0200 [thread overview]
Message-ID: <534852D4.5070608@web.de> (raw)
In-Reply-To: <E8A9F28E-FF68-4899-B02C-DB7A2C66F38A@ammeter.ch>
On 2014-04-11 22.20, Frank Ammeter wrote:
> I’m not a git expert and this might be the wrong place to ask this question,
> so please send me somewhere else if I’m in the wrong place.
>
> I asked the same question on stack overflow, but didn’t get any response:
> http://stackoverflow.com/questions/22823004/files-incorrectly-reported-modified-git-attributes-buggy-leading-to-inconsist
>
> If a file is committed with crlf line endings with the text attribute unset in the working tree, but the text attribute is set in the repo, the file will be incorrectly shown as modified - for all users checking out the file.
> Resetting or manually modifying the file will not help - The only remedy is to commit the .gitattributes with the text attribute set for the file.
>
> Wouldn’t it be better to only consider the checked-in gitattributes instead of the attributes in the working tree?
No.
If you change stuff in your working tree (and .gitattributes is a part of the working tree)
how should Git know what you want?
The primary assumption is that you know what you are doing in the working tree.
> Is this a bug in git handling gitattributes or is this wrong usage?
I thinkk No, yes.
If it is wrong usage, is it documented anywhere?
Please have a look here:
https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
And if you think that the documentation can be improved,
please feel free to send suggestions.
A simple "git diff" is a good start, and a patch with a commit message is even better.
next prev parent reply other threads:[~2014-04-11 20:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 20:20 wrong handling of text git attribute leading to files incorrectly reported as modified Frank Ammeter
2014-04-11 20:38 ` Torsten Bögershausen [this message]
2014-04-12 11:29 ` Frank Ammeter
2014-04-15 20:12 ` Brandon McCaig
2014-04-15 21:23 ` Junio C Hamano
2014-04-16 11:49 ` Frank Ammeter
2014-04-16 16:50 ` Junio C Hamano
2014-04-16 17:03 ` Holger Hellmuth
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=534852D4.5070608@web.de \
--to=tboegi@web.de \
--cc=git@ammeter.ch \
--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;
as well as URLs for NNTP newsgroup(s).