pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedIgnore Visual Studio's Temp Files While Working with PG on Windows
19+ messages / 5 participants
[nested] [flat]
* Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-17 06:09 Yasir <yasir.hussain.shah@gmail.com>
0 siblings, 3 replies; 19+ messages in thread
From: Yasir @ 2024-05-17 06:09 UTC (permalink / raw)
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Hi Hackers,
I have been playing with PG on the Windows platform recently. An annoying
thing I faced is that a lot of Visual Studio's temp files kept appearing in
git changed files. Therefore, I am submitting this very trivial patch to
ignore these temp files.
Looking forward to the PG guru's guidance!
Regards...
Yasir Hussain
Principal Software Engineer
Bitnine Global Inc.
Attachments:
v1-ignore-visualstudio-temp-files-while-working-on-windows.patch (text/x-patch, 178B) download
diff --git a/.gitignore b/.gitignore
index 4e911395fe..527e1d8935 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,3 +43,4 @@ lib*.pc
/Release/
/tmp_install/
/portlock/
+/.vs/
^ permalink raw reply [nested|flat] 19+ messages in thread
* Fwd: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-17 06:17 Yasir <yasir.hussain.shah@gmail.com>
parent: Yasir <yasir.hussain.shah@gmail.com>
2 siblings, 0 replies; 19+ messages in thread
From: Yasir @ 2024-05-17 06:17 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Hi Hackers,
I have been playing with PG on the Windows platform recently. An annoying
thing I faced is that a lot of Visual Studio's temp files kept appearing in
git changed files. Therefore, I am submitting this very trivial patch to
ignore these temp files.
Looking forward to the PG guru's guidance!
Regards...
Yasir Hussain
Principal Software Engineer
Bitnine Global Inc.
Attachments:
v1-ignore-visualstudio-temp-files-while-working-on-windows.patch (application/x-patch, 178B) download
diff --git a/.gitignore b/.gitignore
index 4e911395fe..527e1d8935 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,3 +43,4 @@ lib*.pc
/Release/
/tmp_install/
/portlock/
+/.vs/
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-17 06:34 Peter Eisentraut <peter@eisentraut.org>
parent: Yasir <yasir.hussain.shah@gmail.com>
2 siblings, 2 replies; 19+ messages in thread
From: Peter Eisentraut @ 2024-05-17 06:34 UTC (permalink / raw)
To: Yasir <yasir.hussain.shah@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On 17.05.24 08:09, Yasir wrote:
> I have been playing with PG on the Windows platform recently. An
> annoying thing I faced is that a lot of Visual Studio's temp files kept
> appearing in git changed files. Therefore, I am submitting this very
> trivial patch to ignore these temp files.
Our general recommendation is that you put such things into your
personal global git ignore file.
For example, I have in ~/.gitconfig
[core]
excludesFile = ~/.gitexcludes
and then in ~/.gitexcludes I have various ignores that are specific to
my local tooling.
That way we don't have to maintain ignore lists for all the tools in the
world in the PostgreSQL source tree.
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-17 06:48 Yasir <yasir.hussain.shah@gmail.com>
parent: Peter Eisentraut <peter@eisentraut.org>
1 sibling, 0 replies; 19+ messages in thread
From: Yasir @ 2024-05-17 06:48 UTC (permalink / raw)
To: Peter Eisentraut <peter@eisentraut.org>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Nice approach! Thankyou Peter for the guidance.
Regards...
Yasir
On Fri, May 17, 2024 at 11:34 AM Peter Eisentraut <peter@eisentraut.org>
wrote:
> On 17.05.24 08:09, Yasir wrote:
> > I have been playing with PG on the Windows platform recently. An
> > annoying thing I faced is that a lot of Visual Studio's temp files kept
> > appearing in git changed files. Therefore, I am submitting this very
> > trivial patch to ignore these temp files.
>
> Our general recommendation is that you put such things into your
> personal global git ignore file.
>
> For example, I have in ~/.gitconfig
>
> [core]
> excludesFile = ~/.gitexcludes
>
> and then in ~/.gitexcludes I have various ignores that are specific to
> my local tooling.
>
> That way we don't have to maintain ignore lists for all the tools in the
> world in the PostgreSQL source tree.
>
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 14:24 Andrew Dunstan <andrew@dunslane.net>
parent: Peter Eisentraut <peter@eisentraut.org>
1 sibling, 0 replies; 19+ messages in thread
From: Andrew Dunstan @ 2024-05-18 14:24 UTC (permalink / raw)
To: Peter Eisentraut <peter@eisentraut.org>; Yasir <yasir.hussain.shah@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On 2024-05-17 Fr 02:34, Peter Eisentraut wrote:
> On 17.05.24 08:09, Yasir wrote:
>> I have been playing with PG on the Windows platform recently. An
>> annoying thing I faced is that a lot of Visual Studio's temp files
>> kept appearing in git changed files. Therefore, I am submitting this
>> very trivial patch to ignore these temp files.
>
> Our general recommendation is that you put such things into your
> personal global git ignore file.
>
> For example, I have in ~/.gitconfig
>
> [core]
> excludesFile = ~/.gitexcludes
>
> and then in ~/.gitexcludes I have various ignores that are specific to
> my local tooling.
>
> That way we don't have to maintain ignore lists for all the tools in
> the world in the PostgreSQL source tree.
>
>
>
or if you want something repo-specific, you can add entries to
.git/info/exclude
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 14:27 Josef Šimánek <josef.simanek@gmail.com>
parent: Yasir <yasir.hussain.shah@gmail.com>
2 siblings, 2 replies; 19+ messages in thread
From: Josef Šimánek @ 2024-05-18 14:27 UTC (permalink / raw)
To: Yasir <yasir.hussain.shah@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
pá 17. 5. 2024 v 8:09 odesílatel Yasir <yasir.hussain.shah@gmail.com> napsal:
>
> Hi Hackers,
>
> I have been playing with PG on the Windows platform recently. An annoying thing I faced is that a lot of Visual Studio's temp files kept appearing in git changed files. Therefore, I am submitting this very trivial patch to ignore these temp files.
see https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
for various strategies
Anyway if those are not files specific to your setup (like editor
ones), but files which every PG hacker on Windows will generate as
well (which is this case IMHO), it will make sense to add it into
project's gitignore.
> Looking forward to the PG guru's guidance!
>
> Regards...
>
> Yasir Hussain
> Principal Software Engineer
> Bitnine Global Inc.
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 19:26 Yasir <yasir.hussain.shah@gmail.com>
parent: Josef Šimánek <josef.simanek@gmail.com>
1 sibling, 0 replies; 19+ messages in thread
From: Yasir @ 2024-05-18 19:26 UTC (permalink / raw)
To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Sat, May 18, 2024 at 7:27 PM Josef Šimánek <josef.simanek@gmail.com>
wrote:
> pá 17. 5. 2024 v 8:09 odesílatel Yasir <yasir.hussain.shah@gmail.com>
> napsal:
> >
> > Hi Hackers,
> >
> > I have been playing with PG on the Windows platform recently. An
> annoying thing I faced is that a lot of Visual Studio's temp files kept
> appearing in git changed files. Therefore, I am submitting this very
> trivial patch to ignore these temp files.
>
> see
> https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
> for various strategies
>
> Anyway if those are not files specific to your setup (like editor
> ones), but files which every PG hacker on Windows will generate as
> well (which is this case IMHO), it will make sense to add it into
> project's gitignore.
>
.vs directory and temp files within it are created once you open any of the
.sln, .vcproj or .vcxproj files (created with build command when PWD is
postgres/src/tools/msvc) in visual studio. It's a common practice that
developers use visual studio on codebase as it's mostly the default c/c++
files/projects editor.
So, it would be a common case for most of the developers with Windows
platform to add it in project's .gitignore.
> > Looking forward to the PG guru's guidance!
> >
> > Regards...
> >
> > Yasir Hussain
> > Principal Software Engineer
> > Bitnine Global Inc.
> >
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 19:43 Yasir <yasir.hussain.shah@gmail.com>
parent: Josef Šimánek <josef.simanek@gmail.com>
1 sibling, 2 replies; 19+ messages in thread
From: Yasir @ 2024-05-18 19:43 UTC (permalink / raw)
To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Sat, May 18, 2024 at 7:27 PM Josef Šimánek <josef.simanek@gmail.com>
wrote:
> pá 17. 5. 2024 v 8:09 odesílatel Yasir <yasir.hussain.shah@gmail.com>
> napsal:
> >
> > Hi Hackers,
> >
> > I have been playing with PG on the Windows platform recently. An
> annoying thing I faced is that a lot of Visual Studio's temp files kept
> appearing in git changed files. Therefore, I am submitting this very
> trivial patch to ignore these temp files.
>
> see
> https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
> for various strategies
>
>
We can add it to "~/.config/git/ignore" as it will ignore globally on
windows which we don't want. Also we don't have ".git/info/exclude" in PG
project's so the best place left is projects's .gitignore. That's what was
patched.
> Anyway if those are not files specific to your setup (like editor
> ones), but files which every PG hacker on Windows will generate as
> well (which is this case IMHO), it will make sense to add it into
> project's gitignore.
>
> > Looking forward to the PG guru's guidance!
> >
> > Regards...
> >
> > Yasir Hussain
> > Principal Software Engineer
> > Bitnine Global Inc.
> >
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 20:36 Tom Lane <tgl@sss.pgh.pa.us>
parent: Yasir <yasir.hussain.shah@gmail.com>
1 sibling, 1 reply; 19+ messages in thread
From: Tom Lane @ 2024-05-18 20:36 UTC (permalink / raw)
To: Yasir <yasir.hussain.shah@gmail.com>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Yasir <yasir.hussain.shah@gmail.com> writes:
> We can add it to "~/.config/git/ignore" as it will ignore globally on
> windows which we don't want. Also we don't have ".git/info/exclude" in PG
> project's so the best place left is projects's .gitignore. That's what was
> patched.
As Peter said, we're not going to do that. The intention with
the project's .gitignore files is to ignore files that are
intentionally built by our "make" targets (and, hopefully, will be
removed by "make maintainer-clean"). Anything else that you want
git to ignore should be in a personal ignore list; especially
files that are platform-specific. The fact that it's reasonable
to ignore ".vs" files when working with your toolset doesn't mean
that it's reasonable to ignore them when working on some other
platform.
If we used some other policy, we'd have tons of debates about
which files were reasonable to exclude. For myself, for example,
I exclude "*~" (Emacs backup files) and "*.orig" (patch(1)
backup files) but those choices are very much dependent on the
set of tools I choose to use. Other developers have other
personal exclusion lists. If we tried to make the project's
files be the union of all those lists, we'd be at serious risk
of ignoring stuff we absolutely shouldn't ignore in some contexts.
regards, tom lane
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 20:42 Josef Šimánek <josef.simanek@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 19+ messages in thread
From: Josef Šimánek @ 2024-05-18 20:42 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Yasir <yasir.hussain.shah@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
so 18. 5. 2024 v 22:36 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
>
> Yasir <yasir.hussain.shah@gmail.com> writes:
> > We can add it to "~/.config/git/ignore" as it will ignore globally on
> > windows which we don't want. Also we don't have ".git/info/exclude" in PG
> > project's so the best place left is projects's .gitignore. That's what was
> > patched.
>
> As Peter said, we're not going to do that. The intention with
> the project's .gitignore files is to ignore files that are
> intentionally built by our "make" targets (and, hopefully, will be
> removed by "make maintainer-clean"). Anything else that you want
> git to ignore should be in a personal ignore list; especially
> files that are platform-specific. The fact that it's reasonable
> to ignore ".vs" files when working with your toolset doesn't mean
> that it's reasonable to ignore them when working on some other
> platform.
>
> If we used some other policy, we'd have tons of debates about
> which files were reasonable to exclude. For myself, for example,
> I exclude "*~" (Emacs backup files) and "*.orig" (patch(1)
> backup files) but those choices are very much dependent on the
> set of tools I choose to use. Other developers have other
> personal exclusion lists. If we tried to make the project's
> files be the union of all those lists, we'd be at serious risk
> of ignoring stuff we absolutely shouldn't ignore in some contexts.
But this is different. If I understand it well, just by following
https://www.postgresql.org/docs/16/install-windows-full.html you'll
get those files no matter what is your specific environment (or
specific set of tools).
> regards, tom lane
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 20:45 Andrew Dunstan <andrew@dunslane.net>
parent: Yasir <yasir.hussain.shah@gmail.com>
1 sibling, 1 reply; 19+ messages in thread
From: Andrew Dunstan @ 2024-05-18 20:45 UTC (permalink / raw)
To: Yasir <yasir.hussain.shah@gmail.com>; Josef Šimánek <josef.simanek@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On 2024-05-18 Sa 15:43, Yasir wrote:
>
>
> On Sat, May 18, 2024 at 7:27 PM Josef Šimánek
> <josef.simanek@gmail.com> wrote:
>
> pá 17. 5. 2024 v 8:09 odesílatel Yasir
> <yasir.hussain.shah@gmail.com> napsal:
> >
> > Hi Hackers,
> >
> > I have been playing with PG on the Windows platform recently. An
> annoying thing I faced is that a lot of Visual Studio's temp files
> kept appearing in git changed files. Therefore, I am submitting
> this very trivial patch to ignore these temp files.
>
> see
> https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
> for various strategies
>
>
> We can add it to "~/.config/git/ignore" as it will ignore globally on
> windows which we don't want. Also we don't have ".git/info/exclude" in
> PG project's so the best place left is projects's .gitignore. That's
> what was patched.
eh? git creates .git/info/exclude in every git repository AFAIK. And
it's referred to here: <https://git-scm.com/docs/gitignore;
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 20:54 Yasir <yasir.hussain.shah@gmail.com>
parent: Andrew Dunstan <andrew@dunslane.net>
0 siblings, 1 reply; 19+ messages in thread
From: Yasir @ 2024-05-18 20:54 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Sun, May 19, 2024 at 1:45 AM Andrew Dunstan <andrew@dunslane.net> wrote:
>
> On 2024-05-18 Sa 15:43, Yasir wrote:
>
>
>
> On Sat, May 18, 2024 at 7:27 PM Josef Šimánek <josef.simanek@gmail.com>
> wrote:
>
>> pá 17. 5. 2024 v 8:09 odesílatel Yasir <yasir.hussain.shah@gmail.com>
>> napsal:
>> >
>> > Hi Hackers,
>> >
>> > I have been playing with PG on the Windows platform recently. An
>> annoying thing I faced is that a lot of Visual Studio's temp files kept
>> appearing in git changed files. Therefore, I am submitting this very
>> trivial patch to ignore these temp files.
>>
>> see
>> https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
>> for various strategies
>>
>>
> We can add it to "~/.config/git/ignore" as it will ignore globally on
> windows which we don't want. Also we don't have ".git/info/exclude" in PG
> project's so the best place left is projects's .gitignore. That's what was
> patched.
>
>
>
>
> eh? git creates .git/info/exclude in every git repository AFAIK. And it's
> referred to here: <https://git-scm.com/docs/gitignore;
> <https://git-scm.com/docs/gitignore;
>
>
> Yes, git creates .git/info/exclude but point is, it is not in PG
maintained codebase repo. So, no point adding to it.
BTW, Tom and Peter said it's not going to be added anyway!
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:16 Tom Lane <tgl@sss.pgh.pa.us>
parent: Josef Šimánek <josef.simanek@gmail.com>
0 siblings, 2 replies; 19+ messages in thread
From: Tom Lane @ 2024-05-18 21:16 UTC (permalink / raw)
To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: Yasir <yasir.hussain.shah@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
=?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= <josef.simanek@gmail.com> writes:
> But this is different. If I understand it well, just by following
> https://www.postgresql.org/docs/16/install-windows-full.html you'll
> get those files no matter what is your specific environment (or
> specific set of tools).
Hm? Visual Studio seems like quite a specific tool from here.
I did some googling around the question of project .gitignore
files ignoring .vs/, and was amused to come across this:
https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
which seems like a mighty fine example of where we *don't*
want to go.
regards, tom lane
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:23 Josef Šimánek <josef.simanek@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 19+ messages in thread
From: Josef Šimánek @ 2024-05-18 21:23 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Yasir <yasir.hussain.shah@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
so 18. 5. 2024 v 23:16 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
>
> =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= <josef.simanek@gmail.com> writes:
> > But this is different. If I understand it well, just by following
> > https://www.postgresql.org/docs/16/install-windows-full.html you'll
> > get those files no matter what is your specific environment (or
> > specific set of tools).
>
> Hm? Visual Studio seems like quite a specific tool from here.
I initially thought the .vs folder is created just by compiling
PostgreSQL using build.bat (like without opening Visual Studio at
all). But I'm not 100% sure, I'll take a look and report back.
> I did some googling around the question of project .gitignore
> files ignoring .vs/, and was amused to come across this:
>
> https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
>
> which seems like a mighty fine example of where we *don't*
> want to go.
That's clearly a nightmare to maintain. But in this case it should be
all hidden within one .vs folder.
> regards, tom lane
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:27 Yasir <yasir.hussain.shah@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 19+ messages in thread
From: Yasir @ 2024-05-18 21:27 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Sun, May 19, 2024 at 2:16 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= <josef.simanek@gmail.com> writes:
> > But this is different. If I understand it well, just by following
> > https://www.postgresql.org/docs/16/install-windows-full.html you'll
> > get those files no matter what is your specific environment (or
> > specific set of tools).
>
> Hm? Visual Studio seems like quite a specific tool from here.
>
> I did some googling around the question of project .gitignore
> files ignoring .vs/, and was amused to come across this:
>
> https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
>
>
This is funny Tom. Adding an entry for each type of temp file in .gitignore
is a childish thing, obviously.
which seems like a mighty fine example of where we *don't*
> want to go.
>
I agree we don't want to go in this direction.
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:29 Yasir <yasir.hussain.shah@gmail.com>
parent: Josef Šimánek <josef.simanek@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Yasir @ 2024-05-18 21:29 UTC (permalink / raw)
To: Josef Šimánek <josef.simanek@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Sun, May 19, 2024 at 2:23 AM Josef Šimánek <josef.simanek@gmail.com>
wrote:
> so 18. 5. 2024 v 23:16 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
> >
> > =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= <josef.simanek@gmail.com> writes:
> > > But this is different. If I understand it well, just by following
> > > https://www.postgresql.org/docs/16/install-windows-full.html you'll
> > > get those files no matter what is your specific environment (or
> > > specific set of tools).
> >
> > Hm? Visual Studio seems like quite a specific tool from here.
>
> I initially thought the .vs folder is created just by compiling
> PostgreSQL using build.bat (like without opening Visual Studio at
> all). But I'm not 100% sure, I'll take a look and report back.
>
.vs folder is not created just by compiling PG. It is created if you open
any of .sln, .vcproj or .vcxproj files.
I have verified it.
>
> > I did some googling around the question of project .gitignore
> > files ignoring .vs/, and was amused to come across this:
> >
> > https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
> >
> > which seems like a mighty fine example of where we *don't*
> > want to go.
>
> That's clearly a nightmare to maintain. But in this case it should be
> all hidden within one .vs folder.
>
> > regards, tom lane
>
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:31 Josef Šimánek <josef.simanek@gmail.com>
parent: Yasir <yasir.hussain.shah@gmail.com>
0 siblings, 0 replies; 19+ messages in thread
From: Josef Šimánek @ 2024-05-18 21:31 UTC (permalink / raw)
To: Yasir <yasir.hussain.shah@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
so 18. 5. 2024 v 23:29 odesílatel Yasir <yasir.hussain.shah@gmail.com> napsal:
>
>
>
> On Sun, May 19, 2024 at 2:23 AM Josef Šimánek <josef.simanek@gmail.com> wrote:
>>
>> so 18. 5. 2024 v 23:16 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
>> >
>> > =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= <josef.simanek@gmail.com> writes:
>> > > But this is different. If I understand it well, just by following
>> > > https://www.postgresql.org/docs/16/install-windows-full.html you'll
>> > > get those files no matter what is your specific environment (or
>> > > specific set of tools).
>> >
>> > Hm? Visual Studio seems like quite a specific tool from here.
>>
>> I initially thought the .vs folder is created just by compiling
>> PostgreSQL using build.bat (like without opening Visual Studio at
>> all). But I'm not 100% sure, I'll take a look and report back.
>
>
> .vs folder is not created just by compiling PG. It is created if you open any of .sln, .vcproj or .vcxproj files.
> I have verified it.
Yes, I can confirm. Just running build.bat doesn't create .vs. I'm
sorry for confusion and I do agree ignoring ".vs" directory is a local
environment thing and doesn't belong to Postgres .gitignore.
>>
>>
>> > I did some googling around the question of project .gitignore
>> > files ignoring .vs/, and was amused to come across this:
>> >
>> > https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
>> >
>> > which seems like a mighty fine example of where we *don't*
>> > want to go.
>>
>> That's clearly a nightmare to maintain. But in this case it should be
>> all hidden within one .vs folder.
>>
>> > regards, tom lane
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:35 Andrew Dunstan <andrew@dunslane.net>
parent: Yasir <yasir.hussain.shah@gmail.com>
0 siblings, 1 reply; 19+ messages in thread
From: Andrew Dunstan @ 2024-05-18 21:35 UTC (permalink / raw)
To: Yasir <yasir.hussain.shah@gmail.com>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On 2024-05-18 Sa 16:54, Yasir wrote:
>
>
> On Sun, May 19, 2024 at 1:45 AM Andrew Dunstan <andrew@dunslane.net>
> wrote:
>
>
> On 2024-05-18 Sa 15:43, Yasir wrote:
>>
>>
>> On Sat, May 18, 2024 at 7:27 PM Josef Šimánek
>> <josef.simanek@gmail.com> wrote:
>>
>> pá 17. 5. 2024 v 8:09 odesílatel Yasir
>> <yasir.hussain.shah@gmail.com> napsal:
>> >
>> > Hi Hackers,
>> >
>> > I have been playing with PG on the Windows platform
>> recently. An annoying thing I faced is that a lot of Visual
>> Studio's temp files kept appearing in git changed files.
>> Therefore, I am submitting this very trivial patch to ignore
>> these temp files.
>>
>> see
>> https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
>> for various strategies
>>
>>
>> We can add it to "~/.config/git/ignore" as it will ignore
>> globally on windows which we don't want. Also we don't have
>> ".git/info/exclude" in PG project's so the best place left is
>> projects's .gitignore. That's what was patched.
>
>
>
> eh? git creates .git/info/exclude in every git repository AFAIK.
> And it's referred to here: <https://git-scm.com/docs/gitignore;
> <https://git-scm.com/docs/gitignore;
>
>
> Yes, git creates .git/info/exclude but point is, it is not in PG
> maintained codebase repo. So, no point adding to it.
>
> BTW, Tom and Peter said it's not going to be added anyway!
>
>
You've completely missed my point, which is that *you* should be adding
it to that file, as an alternative to using a (locally) global gitignore
file.
I agree with Tom and Peter.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 19+ messages in thread
* Re: Ignore Visual Studio's Temp Files While Working with PG on Windows
@ 2024-05-18 21:41 Yasir <yasir.hussain.shah@gmail.com>
parent: Andrew Dunstan <andrew@dunslane.net>
0 siblings, 0 replies; 19+ messages in thread
From: Yasir @ 2024-05-18 21:41 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Josef Šimánek <josef.simanek@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Sun, May 19, 2024 at 2:35 AM Andrew Dunstan <andrew@dunslane.net> wrote:
>
> On 2024-05-18 Sa 16:54, Yasir wrote:
>
>
>
> On Sun, May 19, 2024 at 1:45 AM Andrew Dunstan <andrew@dunslane.net>
> wrote:
>
>>
>> On 2024-05-18 Sa 15:43, Yasir wrote:
>>
>>
>>
>> On Sat, May 18, 2024 at 7:27 PM Josef Šimánek <josef.simanek@gmail.com>
>> wrote:
>>
>>> pá 17. 5. 2024 v 8:09 odesílatel Yasir <yasir.hussain.shah@gmail.com>
>>> napsal:
>>> >
>>> > Hi Hackers,
>>> >
>>> > I have been playing with PG on the Windows platform recently. An
>>> annoying thing I faced is that a lot of Visual Studio's temp files kept
>>> appearing in git changed files. Therefore, I am submitting this very
>>> trivial patch to ignore these temp files.
>>>
>>> see
>>> https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-f...
>>> for various strategies
>>>
>>>
>> We can add it to "~/.config/git/ignore" as it will ignore globally on
>> windows which we don't want. Also we don't have ".git/info/exclude" in PG
>> project's so the best place left is projects's .gitignore. That's what was
>> patched.
>>
>>
>>
>>
>> eh? git creates .git/info/exclude in every git repository AFAIK. And it's
>> referred to here: <https://git-scm.com/docs/gitignore;
>> <https://git-scm.com/docs/gitignore;
>>
>>
>> Yes, git creates .git/info/exclude but point is, it is not in PG
> maintained codebase repo. So, no point adding to it.
>
> BTW, Tom and Peter said it's not going to be added anyway!
>
>
>>
>>
> You've completely missed my point, which is that *you* should be adding it
> to that file, as an alternative to using a (locally) global gitignore file.
>
My bad Andrew.
> I agree with Tom and Peter.
>
>
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>
^ permalink raw reply [nested|flat] 19+ messages in thread
end of thread, other threads:[~2024-05-18 21:41 UTC | newest]
Thread overview: 19+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17 06:09 Ignore Visual Studio's Temp Files While Working with PG on Windows Yasir <yasir.hussain.shah@gmail.com>
2024-05-17 06:17 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-17 06:34 ` Peter Eisentraut <peter@eisentraut.org>
2024-05-17 06:48 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-18 14:24 ` Andrew Dunstan <andrew@dunslane.net>
2024-05-18 14:27 ` Josef Šimánek <josef.simanek@gmail.com>
2024-05-18 19:26 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-18 19:43 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-18 20:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-05-18 20:42 ` Josef Šimánek <josef.simanek@gmail.com>
2024-05-18 21:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-05-18 21:23 ` Josef Šimánek <josef.simanek@gmail.com>
2024-05-18 21:29 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-18 21:31 ` Josef Šimánek <josef.simanek@gmail.com>
2024-05-18 21:27 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-18 20:45 ` Andrew Dunstan <andrew@dunslane.net>
2024-05-18 20:54 ` Yasir <yasir.hussain.shah@gmail.com>
2024-05-18 21:35 ` Andrew Dunstan <andrew@dunslane.net>
2024-05-18 21:41 ` Yasir <yasir.hussain.shah@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox