Re: [PATCH] doc: fix quoting bug in credential cache example
- From
Jeff King <peff@peff.net>
- Date
- May 1, 2020, 06:25 UTC
- Message-ID
- <20200501062552.GC25603@coredump.intra.peff.net>
- In-Reply-To
- <xmqq368kp457.fsf@gitster.c.googlers.com>
On Thu, Apr 30, 2020 at 11:20:52PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> > # or you can specify your own shell snippet
> > -!f() { echo "password=`cat $HOME/.secret`"; }; f
> > +[credential]
> > +helper = "!f() { echo \"password=`cat $HOME/.secret`\"; }; f"
>
> But I do not think the "tentative shell function" trick is
> necessary. I personally think it is oversold ;-) For this
> particular one,
>
> [credential]
> helper = !echo \"password=`cat $HOME/.secret`\"
>
> should be sufficient, perhaps? You do not even need to understand
> how shell functions work to understand it.That will print:
password=your-password get
See the patches I just sent for a better example. :)
> Also, "git config" indents the "var = value" lines, so it would look > more natural if we indented our examples in a similar way.
We do earlier, too.
I can re-indent the patches I just set, but I'll hold off on sending in case you have any other comment.
-Peff