Thread (2 messages) 2 messages, 2 authors, 2020-05-01

Re: [PATCH] doc: fix quoting bug in credential cache example

From: Jeff King <hidden>
Date: 2020-05-01 06:25:54

On Thu, Apr 30, 2020 at 11:20:52PM -0700, Junio C Hamano wrote:
quoted
 # 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help