From: Greg KH <gregkh@linuxfoundation.org>
To: Zhaoyu Liu <zackary.liu.pro@gmail.com>
Cc: masahiroy@kernel.org, ripxorip@gmail.com, mpe@ellerman.id.au,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/tags: merge "TAGS" and "tags" in case
Date: Fri, 26 Nov 2021 16:58:00 +0100 [thread overview]
Message-ID: <YaEECIyT3LT7JQzQ@kroah.com> (raw)
In-Reply-To: <20211103153522.GA23842@pc>
On Wed, Nov 03, 2021 at 11:35:29PM +0800, Zhaoyu Liu wrote:
> merge "TAGS" and "tags" for the code more concise
>
> Signed-off-by: Zhaoyu Liu <zackary.liu.pro@gmail.com>
> ---
> scripts/tags.sh | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index 16d475b3e203..a9181dd0fee2 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -315,15 +315,11 @@ case "$1" in
> dogtags
> ;;
>
> - "tags")
> - rm -f tags
> - xtags ctags
> - remove_structs=y
> - ;;
> -
> - "TAGS")
> - rm -f TAGS
> - xtags etags
> + "TAGS" | "tags")
> + rm -f $1
> + xtags $([ $1 = "tags" ] \
> + && echo ctags \
> + || echo etags)
> remove_structs=y
> ;;
Ick, that's much harder to read and understand.
What is wrong with the existing code? It's obvious and makes sense, it
is not duplicating any lines here except the one "remove_structs=y"
which is fine.
I'm not going to take this, sorry.
greg k-h
next prev parent reply other threads:[~2021-11-26 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-03 15:35 [PATCH] scripts/tags: merge "TAGS" and "tags" in case Zhaoyu Liu
2021-11-26 15:58 ` Greg KH [this message]
2021-11-27 1:33 ` Zackary Liu
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=YaEECIyT3LT7JQzQ@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=ripxorip@gmail.com \
--cc=zackary.liu.pro@gmail.com \
/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