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

Re: [PATCH 1/2] parse-options: expand $HOME on filename options

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 15, 2018, 18:36 UTC
Message-ID
<xmqq4lmi9k2m.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87wozffavp.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 14 quoted lines
> In general I'm mildly negative on adding this, for every user like Doron
> who'll be less confused by a hack like this, you'll have other users
> who'll be confused about git inexplicably working with ~ in the middle
> of strings, even though;
>
>     $ echo git init --template ~/path
>     git init --template /home/avar/path
>     $ echo git init --template=~/path
>     git init --template=~/path
>
> I think it makes more sense to just leave such expansion to the shell,
> and not try to magically expand it after the fact, since it's both
> confusing (user: why does this work with git and not this other
> program?), and as shown above changes existing semantics.
The above certainly is a reasonable argument.
> I think this way lies madness, and it's better to just avoid it.
Previous: Ævar Arnfjörð BjarmasonNext: Duy Nguyen
Message 8 of 11 in “[BUG] git init doesn't respect `--template` like configuration variable init.templateDir and $GIT_TEMPLATE_DIR”
  1. Doron BeharFeb 14, 2018
  2. 1/2 parse-options: expand $HOME on filename optionsNguyễn Thái Ngọc Duy, Feb 14, 2018
  3. 2/2 init-db: change --template type to OPTION_FILENAMENguyễn Thái Ngọc Duy, Feb 14, 2018
  4. Jeff KingFeb 14, 2018
  5. Jeff KingFeb 14, 2018
  6. Junio C HamanoFeb 14, 2018
  7. Ævar Arnfjörð BjarmasonFeb 14, 2018
  8. Junio C HamanoFeb 15, 2018
  9. Duy NguyenFeb 22, 2018
  10. Ævar Arnfjörð BjarmasonFeb 22, 2018
  11. Duy NguyenFeb 23, 2018

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.