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

Re: [PATCH] doc: option value may be separate for valid reasons

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 25, 2024, 03:04 UTC
Message-ID
<xmqqo7246mjy.fsf@gitster.g>
In-Reply-To
<CAPig+cT_uB-mBwRh_A-HvpO8QCjv_Rw3-6s4gV=BCwYmSGcctg@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 11 quoted lines
>> +   may want to use the separate form, e.g. `git credential-store
>> +   --file ~/sec/rit`, not `git credential-store --file=~/sec/rit`.
>> +   The shell will expand `~/` in the former to your home directory,
>> +   but most shells keep the tilde in the latter.  Some of our
>> +   commands know how to tilde-expand the option value internally,
>> +   but not all.  The `--file` option of `credential-store` is an
>> +   example that it needs shell's help to tilde-expand its value.
>
> I'm not sure the final sentence adds any value considering that
> credential-store was already mentioned in the example earlier in the
> paragraph, though I suppose it doesn't hurt to keep the sentence.
Probably.
Show 19 quoted lines
>> diff --git c/Documentation/gitcredentials.txt w/Documentation/gitcredentials.txt
>> @@ -240,10 +240,15 @@ Here are some example specifications:
>>  # the arguments are parsed by the shell, so use shell
>>  # quoting if necessary
>>  [credential]
>>         helper = "foo --bar='whitespace arg'"
>>
>> +# store helper (discouraged) with custom location for the db file;
>> +# tilde expansion often requires the filename as a separate argument.
>> +[credential]
>> +       helper = "store --file ~/.git-secret.txt"
>
> In the context of the commit message, I understand why you added the
> comment above this example, but as a mere user without having that
> context, I think the part starting "tilde expansion..." would confuse
> me more than help. Perhaps being a bit more explicit might help:
>
>     # use `--file ~/path` rather than `--file=~/path` to allow the
>     # shell to expand tilde to the home directory
You're right.  That reads much better.
Thanks.
Previous: Eric SunshineNext: Junio C Hamano
Message 3 of 6 in “doc: option value may be separate for valid reasons”
  1. doc: option value may be separate for valid reasonsJunio C Hamano, Nov 24, 2024
  2. Eric SunshineNov 24, 2024
  3. Junio C HamanoNov 25, 2024
  4. doc: option value may be separate for valid reasonsJunio C Hamano, Nov 25, 2024
  5. Eric SunshineNov 25, 2024
  6. Junio C HamanoNov 25, 2024

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.