git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] doc: option value may be separate for valid reasons
Date: Mon, 25 Nov 2024 12:04:49 +0900	[thread overview]
Message-ID: <xmqqo7246mjy.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cT_uB-mBwRh_A-HvpO8QCjv_Rw3-6s4gV=BCwYmSGcctg@mail.gmail.com> (Eric Sunshine's message of "Sun, 24 Nov 2024 18:54:34 -0500")

Eric Sunshine <sunshine@sunshineco.com> writes:

>> +   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.

>> 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.

  reply	other threads:[~2024-11-25  3:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-24  9:43 [PATCH] doc: option value may be separate for valid reasons Junio C Hamano
2024-11-24 23:54 ` Eric Sunshine
2024-11-25  3:04   ` Junio C Hamano [this message]
2024-11-25  3:14 ` [PATCH v2] " Junio C Hamano
2024-11-25  3:35   ` Eric Sunshine
2024-11-25  4:49     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo7246mjy.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).