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

Re: [PATCH] -C/--chdir command line option

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 20, 2008, 06:26 UTC
Message-ID
<81b0412b0810192326n7ace9d4fjd8013cbe1872df22@mail.gmail.com>
In-Reply-To
<7vhc774ydr.fsf@gitster.siamese.dyndns.org>
2008/10/20 Junio C Hamano <gitster@pobox.com>:
Show 10 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> I wouldn't however suggest allowing the syntax to set environment
> variables, like:
>
>        $ git GIT_AUTHOR_NAME="A U Thor" commit
>
> as this is something your shell lets you do easily, i.e:
>
>        $ GIT_AUTHOR_NAME="A U Thor" git commit
>

No, someplace else it doesn't (yes, windows again). It is mostly hard to do there, because the system shell is so primitive, and installation of something sane (sh or env) is an additional (and hard to explain to windows zealots) hassle.

And even in something like Perl it is hard: you cannot change the environment just for the child process, you have to change your own, run the process and change it back.

So, yes, I like your suggestion, but I'd like to _include_ setting all the Git's environment.

Previous: Junio C HamanoNext: Michael J Gruber
Message 8 of 10 in “-C/--chdir command line option”
  1. -C/--chdir command line optionMaciej Pasternacki, Oct 19, 2008
  2. Jeff KingOct 19, 2008
  3. Maciej PasternackiOct 19, 2008
  4. Jeff KingOct 19, 2008
  5. Maciej PasternackiOct 19, 2008
  6. Junio C HamanoOct 20, 2008
  7. Junio C HamanoOct 20, 2008
  8. Alex RiesenOct 20, 2008
  9. Michael J GruberOct 20, 2008
  10. Nguyen Thai Ngoc DuyOct 20, 2008

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.