From: Jeff King <peff@peff.net>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Duy Nguyen <pclouds@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: Proposal: sharing .git/config
Date: Tue, 12 Mar 2013 04:53:42 -0400 [thread overview]
Message-ID: <20130312085342.GA11340@sigill.intra.peff.net> (raw)
In-Reply-To: <CALkWK0kZiYmbh-dSr-c2mzK2Mzhf3iZ_T3hFNuR57F0b5tptGw@mail.gmail.com>
On Tue, Mar 12, 2013 at 01:01:08AM +0530, Ramkumar Ramachandra wrote:
> > But it was pointed out that you could also just do:
> >
> > $ git config include.ref upstream-config
> > $ git show origin/config ;# make sure it looks reasonable
> > $ git show origin/config >.git/upstream-config
> >
> > and so forth. There are some ways that a pure ref can be more
> > convenient (e.g., if you are carrying local changes on top of the
> > upstream config and want to merge), but ultimately, you can replicate
> > any include.ref workflow with include.path by adding a "deploy" step
> > where you copy the file into $GIT_DIR.
>
> This seems to be unnecessarily complex and inelegant. Maybe this
> functionality is best managed as a separate git repository: `repo`
> from depot_tools uses a manifest repository containing all the project
> metadata. Maybe we can extend it/ write an more general version?
I don't think you can avoid the 3-step problem and retain the safety in
the general case. Forgetting implementation details for a minute, you
have either a 1-step system:
1. Fetch and start using config from the remote.
which is subject to fetching and executing malicious config, or:
1. Fetch config from remote.
2. Inspect it.
3. Integrate it into the current config.
We can automate the sequence to remove as much friction as possible, but
fundamentally step 2 requires some effort from the user. Moving the
config to a separate repo does not get rid of those steps. The user
either does not look at the config before using it, in which case we are
no better than the 1-step scenario, or they do, in which case they are
replicating the 3-step scenario.
The other alternative is to automate step 2. The simplest way would be
to have a whitelist of "ok to share" config, that would not include
things like diff.external that can run arbitrary code. I don't know
whether that would make the system too limited for what people want to
do. Do we have a concrete example of what config people would like to
share in this manner?
-Peff
next prev parent reply other threads:[~2013-03-12 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 9:25 Proposal: sharing .git/config Ramkumar Ramachandra
2013-02-19 10:03 ` Thomas Rast
2013-02-19 10:24 ` Ramkumar Ramachandra
2013-02-19 10:39 ` Thomas Rast
2013-02-19 10:34 ` Duy Nguyen
2013-02-19 15:36 ` Jeff King
2013-03-11 19:31 ` Ramkumar Ramachandra
2013-03-12 8:53 ` Jeff King [this message]
2013-03-18 9:00 ` Ramkumar Ramachandra
2013-03-18 11:48 ` Jeff King
2013-02-19 14:38 ` Adam Spiers
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=20130312085342.GA11340@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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).