git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Josh Sharpe <josh.m.sharpe@gmail.com>, git@vger.kernel.org
Subject: Re: feature request - have git honor nested .gitconfig files
Date: Sat, 23 Mar 2013 04:03:41 -0400	[thread overview]
Message-ID: <20130323080341.GA29768@sigill.intra.peff.net> (raw)
In-Reply-To: <20130323000628.GM12223@google.com>

On Fri, Mar 22, 2013 at 05:06:28PM -0700, Jonathan Nieder wrote:

> > I'd rather not invent a new language. It will either not be featureful
> > enough, or will end up bloated. Or both. How about something like:
> >
> >   [include]
> >        exec = "
> >          case \"$GIT_DIR\" in)
> >            */dev/*) cat ~/.config/git/dev-config ;;
> >                  *) cat ~/.config/git/nondev-config ;;
> >           esac
> >        "
> 
> Yes, an existing language like shell or lua would presumably be the
> way to go.  The scary aspect of shell is the "Prankster sets up a
> malicious configuration, asks a sysadmin to help in her repository"
> scenario.  Of course we already have that problem with command
> aliases, but if the sysadmin has perfect spelling then aliases would
> never trip, so...

And also external diff, textconv, clean/smudge filters, and I'm probably
forgetting more. Oh, and hooks. There's definitely a danger to running
arbitrary git commands against a maliciously constructed repo. We've
tried to make upload-pack safe, so you can at least make your own safe
copy to examine. We could probably do more safety checks when the
running user and repo owner or not the same, but it would be quite
complicated, and in practice it does not seem to be that huge a problem.

> Hopefully that's enough information for anyone interested to start and
> understand the relevant variables at play.

Yeah, I'm not planning to work on this, but I'd be happy to review
patches if somebody else wants to.

-Peff

  reply	other threads:[~2013-03-23  8:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 16:50 feature request - have git honor nested .gitconfig files Josh Sharpe
2013-03-22 18:22 ` Jonathan Nieder
2013-03-22 18:33   ` Jeff King
2013-03-23  0:06     ` Jonathan Nieder
2013-03-23  8:03       ` Jeff King [this message]
2013-03-24  7:14         ` Junio C Hamano
2013-03-23  6:15     ` Thomas Rast
2013-03-23  8:06       ` Jeff King

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=20130323080341.GA29768@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=josh.m.sharpe@gmail.com \
    --cc=jrnieder@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).