Обсуждение: can we add some file(msvc) to gitignore

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

can we add some file(msvc) to gitignore

От
"wangsh.fnst@fujitsu.com"
Дата:
Hi,

When I work on patch[1] 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]
https://www.postgresql.org/message-id/flat/OSBPR01MB4214FA221FFE046F11F2AD74F2D49@OSBPR01MB4214.jpnprd01.prod.outlook.com

Regards.
Shenhao Wang



Re: can we add some file(msvc) to gitignore

От
Daniel Gustafsson
Дата:
> 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/




Re: can we add some file(msvc) to gitignore

От
Michael Paquier
Дата:
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

Вложения

Re: can we add some file(msvc) to gitignore

От
Daniel Gustafsson
Дата:
> 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/