BUG #16042: incorrect .gitignore file

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

BUG #16042: incorrect .gitignore file

От:
PG Bug reporting form <noreply@postgresql.org>
Дата:
The following bug has been logged on the website:

Bug reference:      16042
Logged by:          Denis Stuchalin
Email address:      stuchalin.d@gmail.com
PostgreSQL version: 11.5
Operating system:   Linux
Description:        

The sourses repository https://www.postgresql.org/ftp/source/v11.5/.
The source codes contain the file src/bin/pg_waldump/.gitignore
This file contains the line /*desc.c
This line does not give the correct commit file rmgrdesc.c from this
directory to the "my" git repository.
This problem does not allow to build a postgresql cloned from "my" git
repository, since git does not have the file need to build successfully.

Workflow:
1. Download souses from https://www.postgresql.org/ftp/source/v11.5/
2. Push sourses into GIT repo
3. Clone souses from GIT into other place.
4. Build from cloned sourses FAILED.

Re: BUG #16042: incorrect .gitignore file

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
PG Bug reporting form  writes:
> The source codes contain the file src/bin/pg_waldump/.gitignore
> This file contains the line /*desc.c
> This line does not give the correct commit file rmgrdesc.c from this
> directory to the "my" git repository.

Yeah, somebody was being overly lazy there.  I cleaned it up.

			regards, tom lane


Re: BUG #16042: incorrect .gitignore file

От:
Andres Freund <andres@anarazel.de>
Дата:
Hi,

On 2019-10-05 12:28:01 -0400, Tom Lane wrote:
> PG Bug reporting form  writes:
> > The source codes contain the file src/bin/pg_waldump/.gitignore
> > This file contains the line /*desc.c
> > This line does not give the correct commit file rmgrdesc.c from this
> > directory to the "my" git repository.
> 
> Yeah, somebody was being overly lazy there.  I cleaned it up.

Seems like adding a !rmgrdesc.c pattern would have a been easier?

       •   An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become
           included again. It is not possible to re-include a file if a parent directory of that file is excluded. Git
           doesn’t list excluded directories for performance reasons, so any patterns on contained files have no effect, no
           matter where they are defined. Put a backslash ("\") in front of the first "!" for patterns that begin with a
           literal "!", for example, "\!important!.txt".

Greetings,

Andres Freund


Re: BUG #16042: incorrect .gitignore file

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Andres Freund  writes:
> On 2019-10-05 12:28:01 -0400, Tom Lane wrote:
>> Yeah, somebody was being overly lazy there.  I cleaned it up.

> Seems like adding a !rmgrdesc.c pattern would have a been easier?

I'm not terribly trusting of this sort of wildcard usage in .gitignore
to begin with.  It's way too easy to ignore something you shouldn't,
as indeed this bug did.

			regards, tom lane


FAQ