bug-gnulib
[Top][All Lists]
Advanced

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

Re: overly zealous git hook


From: Bruno Haible
Subject: Re: overly zealous git hook
Date: Tue, 21 Jul 2009 02:44:15 +0200
User-agent: KMail/1.9.9

Hi Jim,

> Actually, I see trailing blank lines in any text file
> as an opportunity for unexpected merge conflicts, as
> one person adds or removes one of those oft-unnoticed lines,
> and someone else makes a conflicting change.

Conflicts generally occur at spots that are heavily modified,
such as the end of log files or the start of ChangeLog files.
For modules/* files, the last section is the 'Maintainer' section,
which rarely changes. Likewise for the end of ChangeLog files:
it does not change at all, usually.

> FYI, this change in behavior is the result of savannah upgrading to
> the latest version of git, whose git diff --check tests for that.

Ah, understood.

> 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
can be done by adding to .gitattributes a line
  ChangeLog* whitespace=-????
and to modules/.gitattributes a line
  * whitespace=-????
where ???? is the whitespace rule that triggers the error.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]