autoCRLF, git status, git-gui, what is the desired behavior?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying autoCRLF in git compiled from next (75415c455dd307), find some behavior that is probably different than desired dealing with a file where the only changes are to line endings:

create a text file (foo) with \n endings, check it in.
$ u2d foo
$ git diff foo
diff --git a/foo b/foo
$ git status
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#
#       modified:   foo
#
$ git ci -m 'x' foo
# On branch master
nothing to commit (working directory clean)

So, git commit will not check in the file, but git status shows an unclean file and git diff shows no actual differences.

Also, git-gui shows the file as modified, but clicking on that file gives a warning box saying "No differences detected...", does a rescan, and then shows the file as modified again.

I'm not sure of the correct fix:
1) Place the file in a separate category, perhaps "broken line-endings", and indicate that git will not check this in?
2) Overwrite the file with a fresh checkout (erasing the crlf differences)?
3) ?

Mark Levedahl

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]