All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: git@vger.kernel.org
Subject: Re: [PATCH] .gitignore: Ignore editor backup and swap files
Date: Fri, 17 Jan 2014 05:48:55 +0100	[thread overview]
Message-ID: <87fvonz008.fsf@fencepost.gnu.org> (raw)
In-Reply-To: xmqqtxd3y43b.fsf@gitster.dls.corp.google.com

Junio C Hamano <gitster@pobox.com> writes:

> Alexander Berntsen <alexander@plaimi.net> writes:
>
>> Signed-off-by: Alexander Berntsen <alexander@plaimi.net>
>> ---
>>  .gitignore | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/.gitignore b/.gitignore
>> index b5f9def..2905c21 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -240,3 +240,5 @@
>>  *.pdb
>>  /Debug/
>>  /Release/
>> +*~
>> +.*.swp
>
> I personally do not mind listing these common ones too much, but if
> I am not mistaken, our policy on this file so far has been that it
> lists build artifacts, and not personal preference (the *.swp entry
> is useless for those who never use vim, for example).
>
> These paths that depend on your choice of the editor and other tools
> can still be managed in your personal .git/info/exclude in the
> meantime.

Here is a somewhat related question: if one places a file .dir-locals.el
in the top directory of the checkout with the contents:

;;; Directory Local Variables
;;; See Info node `(emacs) Directory Variables' for more information.

((c-mode
  (c-default-style . "linux")
  (indent-tabs-mode . t)))


Then all edits in the whole checkout done with Emacs in C files use the
right indentation style.  Obviously, that's a "personal preference"
setting in that it is useless for those who never use Emacs (the file
can be written/edited using M-x add-dir-local-variable RET).  It's still
providing significant convenience for a number of users while touching
only a single file.

-- 
David Kastrup

      parent reply	other threads:[~2014-01-17  4:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-16 21:19 [PATCH] .gitignore: Ignore editor backup and swap files Alexander Berntsen
2014-01-16 22:06 ` Junio C Hamano
2014-01-16 22:15   ` Alexander Berntsen
2014-01-16 22:43   ` Jonathan Nieder
2014-01-17  6:20     ` Duy Nguyen
2014-01-16 22:56   ` Ramsay Jones
2014-01-17  4:48   ` David Kastrup [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvonz008.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.