git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Adds *~ to the .gitignore
@ 2016-06-09 21:10 Lars Vogel
  2016-06-09 21:21 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Vogel @ 2016-06-09 21:10 UTC (permalink / raw)
  To: git; +Cc: Lars Vogel

This helps contributors (like me) using editors which automatically create ~ copies of the changed data

Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 05cb58a..13c7403 100644
--- a/.gitignore
+++ b/.gitignore
@@ -219,3 +219,4 @@
 *.pdb
 /Debug/
 /Release/
+*~
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Adds *~ to the .gitignore
  2016-06-09 21:10 [PATCH] Adds *~ to the .gitignore Lars Vogel
@ 2016-06-09 21:21 ` Junio C Hamano
  2016-06-09 21:38   ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2016-06-09 21:21 UTC (permalink / raw)
  To: Lars Vogel; +Cc: git, Lars Vogel

Lars Vogel <lars.vogel@gmail.com> writes:

> This helps contributors (like me) using editors which automatically create ~ copies of the changed data
>
> Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
> ---

We deliberately left this out and kept it out of .gitignore for the
past 10 years.  The justification was that use of Emacs is merely a
personal choice that is better served by .git/info/excludes; we do
not add .swp for vim users, either, for the same reason.

I personally do not care too deeply either way; I could even support
a move to add some selected small file extensions, as long as we
some (social) mechanism to avoid churning this file every time
somebody new comes and complains their favourite editor or other
tools are not supported.



>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/.gitignore b/.gitignore
> index 05cb58a..13c7403 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -219,3 +219,4 @@
>  *.pdb
>  /Debug/
>  /Release/
> +*~

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Adds *~ to the .gitignore
  2016-06-09 21:21 ` Junio C Hamano
@ 2016-06-09 21:38   ` Jeff King
  2016-06-09 22:48     ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2016-06-09 21:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Lars Vogel, git, Lars Vogel

On Thu, Jun 09, 2016 at 02:21:55PM -0700, Junio C Hamano wrote:

> Lars Vogel <lars.vogel@gmail.com> writes:
> 
> > This helps contributors (like me) using editors which automatically create ~ copies of the changed data
> >
> > Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
> > ---
> 
> We deliberately left this out and kept it out of .gitignore for the
> past 10 years.  The justification was that use of Emacs is merely a
> personal choice that is better served by .git/info/excludes; we do
> not add .swp for vim users, either, for the same reason.

I think a better choice than .git/info/excludes these days is
~/.config/git/ignore. Then it is associated with the user, not the
project (which seems a better fit, since it is the user who is picking
the editor; this should apply across all projects).

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Adds *~ to the .gitignore
  2016-06-09 21:38   ` Jeff King
@ 2016-06-09 22:48     ` Junio C Hamano
  2016-06-09 23:31       ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2016-06-09 22:48 UTC (permalink / raw)
  To: Jeff King; +Cc: Lars Vogel, git, Lars Vogel

Jeff King <peff@peff.net> writes:

> On Thu, Jun 09, 2016 at 02:21:55PM -0700, Junio C Hamano wrote:
>
>> Lars Vogel <lars.vogel@gmail.com> writes:
>> 
>> > This helps contributors (like me) using editors which automatically create ~ copies of the changed data
>> >
>> > Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
>> > ---
>> 
>> We deliberately left this out and kept it out of .gitignore for the
>> past 10 years.  The justification was that use of Emacs is merely a
>> personal choice that is better served by .git/info/excludes; we do
>> not add .swp for vim users, either, for the same reason.
>
> I think a better choice than .git/info/excludes these days is
> ~/.config/git/ignore. Then it is associated with the user, not the
> project (which seems a better fit, since it is the user who is picking
> the editor; this should apply across all projects).

Yes, that is a better alternative you can use these days, of course.

Thanks.

As I said, however, I could support a move to add some selected
small number of common file extensions, as long as we have some
(social) mechanism to avoid churning this file every time somebody
new comes and complains their favourite editor or other tools are
not supported.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Adds *~ to the .gitignore
  2016-06-09 22:48     ` Junio C Hamano
@ 2016-06-09 23:31       ` Jeff King
  2016-06-10 15:52         ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2016-06-09 23:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Lars Vogel, git, Lars Vogel

On Thu, Jun 09, 2016 at 03:48:12PM -0700, Junio C Hamano wrote:

> As I said, however, I could support a move to add some selected
> small number of common file extensions, as long as we have some
> (social) mechanism to avoid churning this file every time somebody
> new comes and complains their favourite editor or other tools are
> not supported.

Yeah, I don't mind it either, myself, provided we avoid the churn.

OTOH, wouldn't somebody who cared about this want it for all of their
projects? I guess I just don't see the point in making this a
git-specific thing.

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Adds *~ to the .gitignore
  2016-06-09 23:31       ` Jeff King
@ 2016-06-10 15:52         ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2016-06-10 15:52 UTC (permalink / raw)
  To: Jeff King; +Cc: Lars Vogel, git, Lars Vogel

Jeff King <peff@peff.net> writes:

> On Thu, Jun 09, 2016 at 03:48:12PM -0700, Junio C Hamano wrote:
>
>> As I said, however, I could support a move to add some selected
>> small number of common file extensions, as long as we have some
>> (social) mechanism to avoid churning this file every time somebody
>> new comes and complains their favourite editor or other tools are
>> not supported.
>
> Yeah, I don't mind it either, myself, provided we avoid the churn.
>
> OTOH, wouldn't somebody who cared about this want it for all of their
> projects? I guess I just don't see the point in making this a
> git-specific thing.

My version was "it is your personal preference, why should we cater
to it while we know we cannot do the same for everybody else who has
different preference?"

Your version is a lot more positive, while leading to the same
conclusion.  "It is your personal preference.  Even if we added it
ourselves, it would not help you with other projects".

As usual, you are more brilliant than I am here.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-10 15:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 21:10 [PATCH] Adds *~ to the .gitignore Lars Vogel
2016-06-09 21:21 ` Junio C Hamano
2016-06-09 21:38   ` Jeff King
2016-06-09 22:48     ` Junio C Hamano
2016-06-09 23:31       ` Jeff King
2016-06-10 15:52         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).