BUG #16042: incorrect .gitignore file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG #16042: incorrect .gitignore file

PG Bug reporting form
The following bug has been logged on the website:

Bug reference:      16042
Logged by:          Denis Stuchalin
Email address:      [hidden email]
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.

Reply | Threaded
Open this post in threaded view
|

Re: BUG #16042: incorrect .gitignore file

Tom Lane-2
PG Bug reporting form <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: BUG #16042: incorrect .gitignore file

Andres Freund
Hi,

On 2019-10-05 12:28:01 -0400, Tom Lane wrote:
> PG Bug reporting form <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: BUG #16042: incorrect .gitignore file

Tom Lane-2
Andres Freund <[hidden email]> 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