Package: git
Version: 1:2.0~next.20131217-1
Severity: wishlist
Tags: upstream

Suppose I add the following line to .gitattributes:

        *.java text

Meanwhile, the repo has had one .java file with CRLF line endings for
a while (a mistake, but it happens).  Because the 'text' attribute
promises that the file should have LF endings when checked in, unless
I update that file, anyone cloning the repository on Windows will
see it as modified --- if they were to add the unchanged file with
"git add" and commit then the line endings would be fixed.

Best for me to fix the line ending now in the same commit as I add
.gitattributes.  Unfortunately (especially if I do not use Windows) it
is likely I will not notice.  Could "git commit" help?

I'm imagining an error when attempting to commit an attribute change
that promises files will only contain LF endings and they don't.  It
would still be possible to commit such a change by running git commit
again with --force.

Noticed in the context of https://github.com/MovingBlocks/Terasology's
engine/src/main/java/org/terasology/math/Matrix4i.java by Mike
Kienenberger on #git.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to