progit2 icon indicating copy to clipboard operation
progit2 copied to clipboard

Chapter 7, "Ignoring Whitespace", doesn't mention "-Xignore-space-at-eol"

Open rpjday opened this issue 7 years ago • 3 comments

P. 262 in PDF, mentions these two possibilities, "-Xignore-all-space or -Xignore-space-change", but doesn't mention a third, "-Xignore-space-at-eol", which seems useful. In addition, it might be informative to throw in a side note and add what else is mentioned at that location in "man git-merge" -- that "git diff" has closely-related options -b, -w and --ignore-space-at-eol.

rpjday avatar Sep 30 '17 15:09 rpjday

:+1:

ben avatar Oct 03 '17 16:10 ben

Holy crap, the more I read, the more I learn about whitespace processing and how involved it is. In addition to core.autocrlf (which is covered in the book), there's core.safecrlf ... starting to think you could write an entire chapter on just whitespace, particularly EOL processing.

One thing to clarify -- prior to Mac OS X, Macs used a single <CR> for EOL which made things even more chaotic, but have mercifully switched to POSIX-standard <LF>. As far as I can tell, no Git commands support any EOL processing that recognizes a single <CR> for EOL. Is there any value in even briefly mentioning that historical artifact?

P.S. Might be worth mentioning the actual definition of a POSIX "line". I think I have some writing ahead of me.

rpjday avatar Oct 06 '17 10:10 rpjday

@rpjday How this story with whitespaces end? In computer science everything is complicated or at least non-easy, even whitespaces.

KZiemian avatar Aug 27 '22 15:08 KZiemian