From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] git-ptx-patches: Simplify nested if construct
Date: Thu, 7 Dec 2023 12:09:53 +0100 [thread overview]
Message-ID: <20231207110953.1328694-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20231129093743.906378-4-u.kleine-koenig@pengutronix.de>
Thanks, applied as 5b1b2174fcad766c495d8bbbd5b2216cafe4fa64.
Michael
[sent from post-receive hook]
On Thu, 07 Dec 2023 12:09:53 +0100, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> Instead of
>
> if A; then
> ...
> else
> if B; then
> ...
> else
> ...
> fi
> fi
>
> use the more compact
>
> if A; then
> ...
> elif B; then
> ...
> else
> ...
> fi
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Message-Id: <20231129093743.906378-4-u.kleine-koenig@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
> index 56e82eb2ee56..b27dbe7905d9 100755
> --- a/scripts/git-ptx-patches
> +++ b/scripts/git-ptx-patches
> @@ -235,11 +235,9 @@ while read patch para; do
> if grep -q "$patch" .ptxdist/series.auto; then
> # ok, this is one of the patches we just touched
> :
> + elif grep -q "$patch" .ptxdist/series.{0,1}; then
> + echo "Base patch \"$patch\"!"
> else
> - if grep -q "$patch" .ptxdist/series.{0,1}; then
> - echo "Base patch \"$patch\"!"
> - else
> - echo "Old patch \"$patch\"!"
> - fi
> + echo "Old patch \"$patch\"!"
> fi
> done | sort
prev parent reply other threads:[~2023-12-07 11:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 9:37 [ptxdist] [PATCH 0/3] git-ptx-patches: A fix and two minor improvements Uwe Kleine-König
2023-11-29 9:37 ` [ptxdist] [PATCH 1/3] git-ptx-patches: Fix a race condition Uwe Kleine-König
2023-11-30 6:09 ` Thorsten Scherer
2023-12-07 11:09 ` [ptxdist] [APPLIED] " Michael Olbrich
2023-11-29 9:37 ` [ptxdist] [PATCH 2/3] git-ptx-patches: Open .ptxdist/series less often for writing Uwe Kleine-König
2023-12-07 11:09 ` [ptxdist] [APPLIED] " Michael Olbrich
2023-11-29 9:37 ` [ptxdist] [PATCH 3/3] git-ptx-patches: Simplify nested if construct Uwe Kleine-König
2023-12-07 11:09 ` Michael Olbrich [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=20231207110953.1328694-1-m.olbrich@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
/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