Patch to .gitignore

Started by Fabrízio de Royes Melloover 12 years ago6 messages
#1Fabrízio de Royes Mello
fabriziomello@gmail.com
1 attachment(s)

Hi all,

The proposed patch add some files to ignore in .gitignore:
- tags (produced by src/tools/make_ctags)
- TAGS (produced bu src/tools/make_etags)
- .*.swp (may appear in source tree if vi/vim was killed by some reason)

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL

Show quoted text

Blog sobre TI: http://fabriziomello.blogspot.com
Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
Twitter: http://twitter.com/fabriziomello

Attachments:

gitignore_ctags_etags_vi.patchapplication/octet-stream; name=gitignore_ctags_etags_vi.patchDownload
diff --git a/.gitignore b/.gitignore
index 8e227a2..e4bb4c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,9 @@ win32ver.rc
 *.exe
 lib*dll.def
 lib*.pc
+tags
+TAGS
+.*.swp
 
 # Local excludes in root directory
 /GNUmakefile
#2Christopher Browne
cbbrowne@gmail.com
In reply to: Fabrízio de Royes Mello (#1)
Re: Patch to .gitignore

There hasn't been general agreement on the merits of particular .gitignore
rules of this sort.

You could hide your own favorite patterns by putting this into your
~/.gitignore that isn't part of the repo, configuring this globally, thus:
git config --global core.excludesfile '~/.gitignore'

That has the consequence that you can hide whatever things your own tools
like to create, and not worry about others' preferences.

Us Emacs users can put things like *~, #*#, and such into our own "ignore"
configuration; that doesn't need to bother you, and vice-versa for your
vim-oriented patterns.

#3Fabrízio de Royes Mello
fabriziomello@gmail.com
In reply to: Christopher Browne (#2)
Re: Patch to .gitignore

On Fri, May 24, 2013 at 12:04 AM, Christopher Browne <cbbrowne@gmail.com>wrote:

There hasn't been general agreement on the merits of particular .gitignore
rules of this sort.

You could hide your own favorite patterns by putting this into your
~/.gitignore that isn't part of the repo, configuring this globally, thus:
git config --global core.excludesfile '~/.gitignore'

Yes... I know that...

That has the consequence that you can hide whatever things your own tools
like to create, and not worry about others' preferences.

Us Emacs users can put things like *~, #*#, and such into our own "ignore"
configuration; that doesn't need to bother you, and vice-versa for your
vim-oriented patterns.

I agree with you about vim-oriented patterns, because its a particular
tool, but "ctags" and "etags" be part of postgres source tree and its
generate some output inside them, so I think we must ignore it.

IMHO all output generated by tools inside the source tree that will not be
committed must be added to .gitignore

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL

Show quoted text

Blog sobre TI: http://fabriziomello.blogspot.com
Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
Twitter: http://twitter.com/fabriziomello

#4amul sul
sul_amul@yahoo.co.in
In reply to: Fabrízio de Royes Mello (#3)
Re: Patch to .gitignore

 >"ctags" and "etags" be part of postgres source tree and its generate some output inside them, so I think we must ignore it. 

+1

Regards,
Amul Sul

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Fabrízio de Royes Mello (#3)
Re: Patch to .gitignore

=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= <fabriziomello@gmail.com> writes:

On Fri, May 24, 2013 at 12:04 AM, Christopher Browne <cbbrowne@gmail.com>wrote:

There hasn't been general agreement on the merits of particular .gitignore
rules of this sort.

I agree with you about vim-oriented patterns, because its a particular
tool, but "ctags" and "etags" be part of postgres source tree and its
generate some output inside them, so I think we must ignore it.

[ shrug... ] Editor backup files get generated inside the source tree
as well. Chris stated the policy accurately: if you use tools that
leave unexpected files in the source tree, it's up to you to have a
personal .gitignore for those, assuming you want them ignored. The
project's .gitignore files are only supposed to list files that get
generated by the standard build processes.

FWIW, my personal .gitexclude file looks like

*~
*.orig

where the latter one is for junk generated by "patch". I believe
patch's extension for saved files varies across versions, so it
wouldn't be too sensible to have an exclusion like that in the
project-wide file. Note also that I intentionally *don't* have an
exclusion for *.rej --- if any patch hunk failed, I want git to
mention it. But that's a matter of personal preference. I rather
imagine that other people configure it differently, and that's fine.
As long as we don't try to put such things in the project-wide
exclusion list, we don't have to have a consensus about it.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Dimitri Fontaine
dimitri@2ndQuadrant.fr
In reply to: Christopher Browne (#2)
Re: Patch to .gitignore

Christopher Browne <cbbrowne@gmail.com> writes:

You could hide your own favorite patterns by putting this into your
~/.gitignore that isn't part of the repo, configuring this globally, thus:
git config --global core.excludesfile '~/.gitignore'

You can also put per-project setup in .git/info/exclude, works well.

Us Emacs users can put things like *~, #*#, and such into our own "ignore"
configuration; that doesn't need to bother you, and vice-versa for your
vim-oriented patterns.

You can also ask Emacs (or any other editor I'm sure) to move its backup
files out of the way. I'm using the following, for example:

(setq backup-directory-alist '((".*" . "~/.emacs.d/backups/")))

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers