Trailing spaces are invisible in most standard editors (*). "git diff" does show trailing spaces by default. But that does not help newly written .gitignore files. And trailing spaces are the source of frustration when writing .gitignore.
So let's ignore them. Nobody sane would put a trailing space in file names. But we could be careful and do it in two steps: warn first, then ignore trailing spaces. Another option is merge two patches in one and be done with it. People can still quote trailing spaces, which will not be ignored (and much more visible). Quoting comes with a cost of doing fnmatch(). But I won't optimize it until I see someone shows me they have a use case for it. (*) either that or my coworkers keep pissing me off on purpose when they never clean trailing spaces. Nguyễn Thái Ngọc Duy (2): dir: warn about trailing spaces in exclude pattern dir: ignore trailing spaces in exclude patterns Documentation/gitignore.txt | 3 +++ dir.c | 9 +++++++++ 2 files changed, 12 insertions(+) -- 188.8.131.52.240.g8478abd -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html