scripts/tags: merge "TAGS" and "tags" in case
PATCH 1/1 scripts/tags: merge "TAGS" and "tags" in case
merge "TAGS" and "tags" for the code more concise
--- scripts/tags.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
scripts/tags.sh +5 -9
@@ -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 ;; esac
Signature · 1 line
2.17.1
Quoted 21 lines · Zhaoyu Liu
merge "TAGS" and "tags" for the code more concise
Signed-off-by Zhaoyu Liu <[email protected]>--- scripts/tags.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)scripts/tags.sh +0
-6@@ -315,15 +315,11 @@ case "$1" in dogtags ;; - "tags") - rm -f tags - xtags ctags - remove_structs=y - ;; -
scripts/tags.sh case "$1" in · line 324
Quoted 10 lines
scripts/tags.sh +5
-3- "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
Quoted 35 lines · Greg KH
Quoted 21 lines · Zhaoyu Liu
merge "TAGS" and "tags" for the code more concise
Signed-off-by Zhaoyu Liu <[email protected]>--- scripts/tags.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)scripts/tags.sh +0
-6@@ -315,15 +315,11 @@ case "$1" in dogtags ;; - "tags") - rm -f tags - xtags ctags - remove_structs=y - ;; -scripts/tags.sh case "$1" in · line 324
Quoted 10 lines
scripts/tags.sh +5
-3- "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.
Quoted 8 lines
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
Ok you're right, Easy to understand is better.
Thank you.
zackary