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

Re: GIT_DIR vs. --git-dir

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Sep 24, 2012, 15:42 UTC
Message-ID
<m2d31ba0lw.fsf@igel.home>
In-Reply-To
<20120924144929.GA10349@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> Bash is even weirder than you might think. Try this:
>
>   $ echo ~/foo
>   /home/peff/foo
>
>   $ echo arg=~/foo
>   arg=/home/peff/foo
>
>   $ echo --arg=~/foo
>   --arg=~/foo

Bash expands all arguments that look like variable assignments. That lets you write "export arg=~/foo" even though a POSIX shell wouldn't tilde expand it.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Previous: Michael J Gruber
Message 17 of 17 in “GIT_DIR vs. --git-dir”
  1. Michael J GruberSep 24, 2012
  2. Nguyen Thai Ngoc DuySep 24, 2012
  3. Michael J GruberSep 24, 2012
  4. Nguyen Thai Ngoc DuySep 24, 2012
  5. Michael J GruberSep 24, 2012
  6. git: expand user path in --git-dirMichael J Gruber, Sep 24, 2012
  7. Jeff KingSep 24, 2012
  8. Michael J GruberSep 24, 2012
  9. Junio C HamanoSep 24, 2012
  10. Jan EngelhardtSep 25, 2012
  11. Michael J GruberSep 25, 2012
  12. Andreas SchwabSep 24, 2012
  13. Junio C HamanoSep 24, 2012
  14. Michael J GruberSep 24, 2012
  15. Jeff KingSep 24, 2012
  16. Michael J GruberSep 24, 2012
  17. Andreas SchwabSep 24, 2012

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.