Bruno Haible wrote: >> >> Since I prefer that the hook continue to apply to all files >> >> for which I have a say, perhaps you'd like to itemize the files >> >> for which you want to allow trailing blank lines? >> > >> > Yes. These should be: modules/**/* and **/ChangeLog*. I believe it >> >> My point was that I'd like the existing hook to remain >> in effect even for modules files. If you want to make >> exceptions for files you own, please itemize them so that >> you do not disable that part of the hook for others. > > This suggestion is not realistic: This file list would have to be on > the server side (file info/attributes), and it would be going to change > regularly. You can't be bothered to change that list every couple of > weeks. > > The modules/* files, from the beginning in December 2002, are designed to > end in a blank line.
I have never seen a good reason to include a trailing blank line in modules/* files. > Even the modules files that you wrote ought to follow > this definition. I disagree. Blank lines at the end of a file are similar to blanks at the end of a line. They are often unseen, and represent yet another source of conflicts. As such, I remove them systematically wherever I can. Of course, they're less of a problem in practice since there's only one possible point of failure per file, rather than one per line. Just as adding a word at the end of a line obliges us to add a separating space, so adding a new section in a modules file can require the addition of a separating blank line. > Now git provides a "service", the git-apply checking, which combines a > useful feature (check against blanks at the end of a line) with an undesired > feature (check against blank lines at the end of the file). > > I've asked the git developers if they can separate these two features into > two different whitespace control flags. Let's see how this works. That would be best. Then you can itemize files for which you would like to allow/require trailing blank lines.