Re: [PATCH v2 1/3] doc: interpret-trailers: don’t use heredoc in examples
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 3, 2023, 20:16 UTC
- Message-ID
- <xmqqmt3o4t81.fsf@gitster.g>
- In-Reply-To
- <38f9a4bdf89f854c30a7b708e955e2089b031c13.1680548650.git.code@khaugsbakk.name>
Show 8 quoted lines
> @@ -357,15 +356,14 @@ Fix #42 > $ cat ~/bin/glog-find-author > #!/bin/sh > test -n "$1" && git log --author="$1" --pretty="%an <%ae>" -1 || true > +$ cat msg.txt > +subject > + > +message
When I suggested to use "cat" to show contents, instead of pretending an interactive session, I didn't check if we already had examples, but it looks like we did, which is great.
> +$ cat msg.txt | git interpret-trailers --trailer="help:Junio" --trailer="help:Couder"
Do not "cat" a single file and pipe into another command. It will always be equivalent to redirecting that file into the command on the downstream, i.e.
$ git interpret-trailers --options <mst.txt
> +$ sed --in-place -e 's/ Z$/ /' commit_template.txt
Avoid "--in-place"; not everybody's "sed" has it.
Other than that, I didn't spot anything glaringly wrong.
Thanks for working on this series.