Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

Поиск
Список
Период
Сортировка
Искать

Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On 11/11/13, 10:26 AM, Tom Lane wrote:
> Peter Eisentraut  writes:
>> Fix whitespace issues found by git diff --check, add gitattributes
>> Set per file type attributes in .gitattributes to fine-tune whitespace
>> checks.  With the associated cleanups, the tree is now clean for git
> 
> Hmm, I thought the .gitattributes file would prevent this:
> 
> $ git diff --staged --check
> src/test/regress/expected/join.out:3110: trailing whitespace.
> + q1 | q2 | f1 | ff 
> 
> Is there something I have to do to configure git to honor the file?
> 
> (In case it matters, this is git 1.7.1, which is what Red Hat is
> shipping these days in RHEL6.)

Older versions of git (before 1.8.2) do not support the "**" syntax used
here:

**/expected/*.out                       -whitespace

If we're slightly daring, we could change this to just

*.out   -whitespace

and analogously for the other entries, but I haven't fully analyzed that.



Re: Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:

On 11/11/2013 02:17 PM, Peter Eisentraut wrote:
> On 11/11/13, 10:26 AM, Tom Lane wrote:
>> Peter Eisentraut  writes:
>>> Fix whitespace issues found by git diff --check, add gitattributes
>>> Set per file type attributes in .gitattributes to fine-tune whitespace
>>> checks.  With the associated cleanups, the tree is now clean for git
>> Hmm, I thought the .gitattributes file would prevent this:
>>
>> $ git diff --staged --check
>> src/test/regress/expected/join.out:3110: trailing whitespace.
>> + q1 | q2 | f1 | ff
>>
>> Is there something I have to do to configure git to honor the file?
>>
>> (In case it matters, this is git 1.7.1, which is what Red Hat is
>> shipping these days in RHEL6.)
> Older versions of git (before 1.8.2) do not support the "**" syntax used
> here:
>
> **/expected/*.out                       -whitespace
>
> If we're slightly daring, we could change this to just
>
> *.out   -whitespace
>
> and analogously for the other entries, but I haven't fully analyzed that.
>
>


Can we please agree on a minimum version of git and just support its 
features? Relying on versions close to the bleeding edge affects a lot 
of people - specifically it potentially affects every buildfarm member 
as well as every developer.

cheers

andrew


Re: Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On Mon, 2013-11-11 at 14:38 -0500, Andrew Dunstan wrote:
> Can we please agree on a minimum version of git and just support its 
> features? Relying on versions close to the bleeding

We're not relying on it.  With an older version, you just can't take
advantage of the newer features, so everything stays the same for you.

That said, I have fixed this particular issue.



Re: Re: [COMMITTERS] pgsql: Fix whitespace issues found by git diff --check, add gitattribut

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Eisentraut  writes:
> That said, I have fixed this particular issue.

Thanks --- I'd just as soon not have to deal with a private installation
of git.
		regards, tom lane


FAQ