git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "git -c web.browser=w3m help -w help" still kicks firefox

From
Jeff King <peff@peff.net>
Date
Aug 23, 2010, 20:33 UTC
Message-ID
<20100823203304.GB4458@coredump.intra.peff.net>
In-Reply-To
<AANLkTi=R6ZdD9GUO6T6uCUkF+KVPbG1FGrieOfeusKct@mail.gmail.com>
On Mon, Aug 23, 2010 at 09:02:36PM +0200, Alex Riesen wrote:
Show 7 quoted lines
> Maybe it is worth fixing, but on a case-by-case basis?
> 
> I mean changing the execv_git_cmd interface (or create a new execv
> function), so that it can get the list of config vars to pass down to
> the callee. A trivial case of its use would be to just pass the
> current config (or, more likely, none).  Or, one could give it its own
> list of config parameters.

I don't think that is enough. We don't necessarily know which config options will be relevant to exec'd processes. We could be running some user-defined command that calls a bunch of other git commands. Or a hook, for that matter.

Which does bring up one interesting boundary. If I run:
  git -c receive.denyDeletes=false git push

what should happen? Obviously with cross-server communication the environment won't get passed. I am inclined to say that even for local cases, receive-pack should clear the string. Certainly for the sake of consistency between local and remote transports, but it may also be a security issue (in most cases, no, since you would have to be exec'ing receive-pack directly, and you are clearly already running an arbitrary command, but I can see somebody perhaps crossing a setuid boundary with receive-pack).

-Peff
Previous: Alex RiesenNext: Jonathan Nieder
Message 9 of 11 in “"git -c web.browser=w3m help -w help" still kicks firefox”
  1. Junio C HamanoAug 23, 2010
  2. Jeff KingAug 23, 2010
  3. Jeff KingAug 23, 2010
  4. 2/1 do not pass "git -c foo=bar" params to transport helpersJonathan Nieder, Aug 24, 2010
  5. Jeff KingAug 24, 2010
  6. Eric RaibleAug 24, 2010
  7. Junio C HamanoJul 1, 2024
  8. Alex RiesenAug 23, 2010
  9. Jeff KingAug 23, 2010
  10. Jonathan NiederAug 24, 2010
  11. Jeff KingAug 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.