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

Re: [PATCH] Added -d and -e options to the "git" script.

From
David Kågedal <davidk@lysator.liu.se>
Date
Sep 19, 2005, 15:08 UTC
Message-ID
<u5tpsr5aye0.fsf@lysator.liu.se>
In-Reply-To
<432ECE5A.7040703@gmail.com>
A Large Angry SCM <gitzilla@gmail.com> writes:
> There are better methods of setting environment variables than an 
> endless set of command options. Use the env command or you own 
> (personal) command wrapper instead.

Remember that, to the user, this isn't about setting environment variables, It's about providing git parameters.

Currently, the only of doing this is by setting environment variables; what I'm suggesting is an *alternative* to that.

The fact that the implementation of these flags would actually use environment variables to propagate these parameters to subprocesses doesn't necessary mean that it is the only sane way to specify it originally.

Anyway, there are other options, such as
   $ git GIT_DIR=/foo/bar status
and today we already have
   $ env GIT_DIR=/foo/bar status

The advantage of these forms is of course that they don't limit the parameters that can be set, so I could keep setting EDITOR if I want to. But if setting GIT_DIR is common enough it might make sense to provide a short flag for that.

The summary of my ramblings are probably that I think the -d flag is a good idea, but no way of specifying other parameters is needed.

-- 
David Kågedal
Previous: A Large Angry SCMNext: Matthias Urlichs
Message 6 of 7 in “Add "--git-dir" flag to git-rev-parse”
  1. Linus TorvaldsSep 18, 2005
  2. Added -d and -e options to the "git" script.David Kågedal, Sep 19, 2005
  3. A Large Angry SCMSep 19, 2005
  4. David KågedalSep 19, 2005
  5. A Large Angry SCMSep 19, 2005
  6. David KågedalSep 19, 2005
  7. Matthias UrlichsSep 19, 2005

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.