threads / patch / 42568

patchAdds *~ to the .gitignore

Subject: [PATCH] Adds *~ to the .gitignore

## tl;dr

6 messages between Jun 16, 2016 and Jun 16, 2016. Diffs are folded; open one to read it.

replies: 5people: 3as markdown or json

Lars Vogel· Jun 9, 2016, 21:10 UTC · lore
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(+)
Show changes to .gitignore +1 −0
diff --git a/.gitignore b/.gitignore
index 05cb58a..13c7403 100644
--- a/.gitignore
+++ b/.gitignore
@@ -219,3 +219,4 @@
 *.pdb
 /Debug/
 /Release/
+*~
-- 
2.8.1
Junio C Hamano· Jun 9, 2016, 21:21 UTC · re: Lars Vogel · lore

Re: [PATCH] Adds *~ to the .gitignore

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.

Show 12 quoted lines
>  .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/
> +*~
Jeff King· Jun 9, 2016, 21:38 UTC · re: Junio C Hamano · lore

Re: [PATCH] Adds *~ to the .gitignore

On Thu, Jun 09, 2016 at 02:21:55PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> 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
Junio C Hamano· Jun 9, 2016, 22:48 UTC · re: Jeff King · lore

Re: [PATCH] Adds *~ to the .gitignore

Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> 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.

Jeff King· Jun 9, 2016, 23:31 UTC · re: Junio C Hamano · lore

Re: [PATCH] Adds *~ to the .gitignore

On Thu, Jun 09, 2016 at 03:48:12PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> 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
Junio C Hamano· Jun 10, 2016, 15:52 UTC · re: Jeff King · lore

Re: [PATCH] Adds *~ to the .gitignore

Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> 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.

← back to recent threads