can we add some file(msvc) to gitignore

Started by wangsh.fnst@fujitsu.comabout 4 years ago4 messages
#1wangsh.fnst@fujitsu.com
wangsh.fnst@fujitsu.com
wangsh.fnst@fujitsu.com

Hi,

When I work on patch[1]/messages/by-id/OSBPR01MB4214FA221FFE046F11F2AD74F2D49@OSBPR01MB4214.jpnprd01.prod.outlook.com on windows(vs2019), I found there are some file(generated
by vs2019) are not listed in gitignore.

$ git status

Untracked files:
(use "git add <file>..." to include in what will be committed)
.vs/
postgres.vcxproj.user
src/tools/msvc/buildvs.bat
src/tools/msvc/installvs.bat

Can we add these file to gitignore?
- *vcproj.user
- *vcxproj.user
- /.vs/

[1]: /messages/by-id/OSBPR01MB4214FA221FFE046F11F2AD74F2D49@OSBPR01MB4214.jpnprd01.prod.outlook.com

Regards.
Shenhao Wang

#2Daniel Gustafsson
Daniel Gustafsson
daniel@yesql.se
In reply to: wangsh.fnst@fujitsu.com (#1)
Re: can we add some file(msvc) to gitignore

On 26 Sep 2021, at 10:57, wangsh.fnst@fujitsu.com wrote:

Can we add these file to gitignore?

As postgres isn't mandating a specific IDE or dev environment, we typically
don't add these files to the .gitignore we ship. If we did it would be an
enormous list we'd have to curate and maintain. Instead, everyone hacking on
postgres can add these to their local gitignore with the core.excludesfile Git
config.

Now, it is true that there are some MSVC specific files in the .gitignore
already, but past discussion on this have leaned towards removing those (which
I personally support) rather than adding new ones.

--
Daniel Gustafsson https://vmware.com/

#3Michael Paquier
Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#2)
Re: can we add some file(msvc) to gitignore

On Sun, Sep 26, 2021 at 12:18:01PM +0200, Daniel Gustafsson wrote:

As postgres isn't mandating a specific IDE or dev environment, we typically
don't add these files to the .gitignore we ship. If we did it would be an
enormous list we'd have to curate and maintain. Instead, everyone hacking on
postgres can add these to their local gitignore with the core.excludesfile Git
config.

Yeah. This is an issue for many things. For example, under emacs or
vim, we'd still track backup files for unsaved changes.

Now, it is true that there are some MSVC specific files in the .gitignore
already, but past discussion on this have leaned towards removing those (which
I personally support) rather than adding new ones.

Agreed. I don't think that we should remove the entries that track
files we could expect based on the state of the build code, though,
like config.pl or buildenv.pl in src/tools/msvc/ as committing those
could silently break builds.
--
Michael

#4Daniel Gustafsson
Daniel Gustafsson
daniel@yesql.se
In reply to: Michael Paquier (#3)
Re: can we add some file(msvc) to gitignore

On 27 Sep 2021, at 02:34, Michael Paquier <michael@paquier.xyz> wrote:

I don't think that we should remove the entries that track
files we could expect based on the state of the build code, though,
like config.pl or buildenv.pl in src/tools/msvc/ as committing those
could silently break builds.

Agreed, those clearly belong in the .gitignore. The ones I was looking at were
*.vcproj and *.vcxproj in the root .gitignore, but I don't know the MSVC build
well enough to know if those make sense or not.

--
Daniel Gustafsson https://vmware.com/