BUG #16042: incorrect .gitignore file

Started by PG Bug reporting formover 6 years ago4 messagesbugs
Jump to latest
#1PG 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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #16042: incorrect .gitignore file

PG Bug reporting form <noreply@postgresql.org> 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

#3Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#2)
Re: BUG #16042: incorrect .gitignore file

Hi,

On 2019-10-05 12:28:01 -0400, Tom Lane wrote:

PG Bug reporting form <noreply@postgresql.org> 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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andres Freund (#3)
Re: BUG #16042: incorrect .gitignore file

Andres Freund <andres@anarazel.de> 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