git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Aaron Schrab <aaron@schrab.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
	git@vger.kernel.org, Jeff King <peff@peff.net>,
	Emily Shaffer <emilyshaffer@google.com>
Subject: Re: [PATCH] Add project-wide .vimrc configuration
Date: Tue, 08 Dec 2020 19:15:47 -0800	[thread overview]
Message-ID: <xmqqblf34ql8.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: X9Al3u9/jw3QWN7q@pug.qqx.org

Aaron Schrab <aaron@schrab.com> writes:

> At 18:26 -0600 08 Dec 2020, Felipe Contreras <felipe.contreras@gmail.com> wrote:
>>By default it's ignored, you need the following in your ~/.vimrc
>>
>>  set exrc
>
> Running `:help 'exrc'` in vim includes the text:
>
>         Setting this option is a potential security leak.  E.g., consider
>         unpacking a package or fetching files from github, a .vimrc in there
>         might be a trojan horse.  BETTER NOT SET THIS OPTION!
>         Instead, define an autocommand in your .vimrc to set options for a
>         matching directory.
>
> So I don't think it's a good idea to encourage people to do that by
> using a name that invites it. Also I think that the file would be more 
> discoverable for people to incorporate into their own configuration if
> not named as a hidden file.

Thanks.  I do not use vim and did not know how commonly recommended
the "set exrc" would be, but what you said makes total sense.  In
that case, I'd suggest shipping this file without the dot-prefix
with a clear instruction how to make use of its contents in a secure
manner in a comment at the top of the file.

If having vimrc (no dot) at the top-level of the tree is untidy, we
can add a place in contrib/ that houses configurations to help
various editors and IDEs (e.g. contrib/editors/), too.

  reply	other threads:[~2020-12-09  3:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  0:26 [PATCH] Add project-wide .vimrc configuration Felipe Contreras
2020-12-09  1:08 ` Junio C Hamano
2020-12-09  2:32   ` Felipe Contreras
2020-12-09  1:18 ` Aaron Schrab
2020-12-09  3:15   ` Junio C Hamano [this message]
2020-12-09  6:28   ` Felipe Contreras
2020-12-09  1:32 ` Denton Liu
2020-12-09  6:20   ` Felipe Contreras
2020-12-09  2:23 ` brian m. carlson
2020-12-09  6:36   ` Felipe Contreras
2020-12-09  6:54     ` Junio C Hamano
2020-12-09  7:16       ` Felipe Contreras
2020-12-09  8:13         ` Junio C Hamano
2020-12-09  8:52           ` Felipe Contreras
2020-12-09 16:18           ` Randall S. Becker

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=xmqqblf34ql8.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=aaron@schrab.com \
    --cc=emilyshaffer@google.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 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).