All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: <git@vger.kernel.org>,  "D. Ben Knoble" <ben.knoble@gmail.com>
Subject: Re: [PATCH v2] thunderbird-patch-inline: avoid bashism
Date: Mon, 10 Feb 2025 16:19:11 -0800	[thread overview]
Message-ID: <xmqqa5at9vuo.fsf@gitster.g> (raw)
In-Reply-To: <20250210234947.1317056-1-sandals@crustytoothpaste.net> (brian m. carlson's message of "Mon, 10 Feb 2025 23:49:47 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> I'll note that I could have just written '%s\n' here, but I think this
> is a little easier to reason about, so I didn't.

Yes, I actually was wondering why you didn't, as I find the "short
format string makes the command iterate over its arguments" easier
to understand, than how you wrote it.  Either is fine, but that
would also have been shorter.

> diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh
> index 1053872eea..fdcc948352 100755
> --- a/contrib/thunderbird-patch-inline/appp.sh
> +++ b/contrib/thunderbird-patch-inline/appp.sh
> @@ -31,7 +31,7 @@ BODY=$(sed -e "1,/${SEP}/d" $1)
>  CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}")
>  DIFF=$(sed -e '1,/^---$/d' "${PATCH}")
>  
> -CCS=$(echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
> +CCS=$(printf '%s\n%s\n' "$CMT_MSG" "$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
>  	-e 's/^Signed-off-by: \(.*\)/\1,/gp')
>  
>  echo "$SUBJECT" > $1

      reply	other threads:[~2025-02-11  0:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  1:46 [PATCH] thunderbird-patch-inline: avoid bashism brian m. carlson
2025-02-04  2:11 ` D. Ben Knoble
2025-02-04  2:43   ` brian m. carlson
2025-02-04 13:28 ` Junio C Hamano
2025-02-10 23:49 ` [PATCH v2] " brian m. carlson
2025-02-11  0:19   ` Junio C Hamano [this message]

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=xmqqa5at9vuo.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.