From 5882056a27b91e4b947951501c8dbee9b811c4a5 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 30 Jun 2024 18:14:58 +0100 Subject: git.sh: merge for loops in git_am_patches() Signed-off-by: Leah Rowe --- include/git.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/git.sh b/include/git.sh index 11e13a6c..70ec087c 100755 --- a/include/git.sh +++ b/include/git.sh @@ -112,12 +112,10 @@ git_am_patches() { for _patch in "$2/"*; do [ -L "$_patch" ] || [ ! -f "$_patch" ] || git -C "$1" am \ - "$_patch" || $err "$1 $2: !git am $_patch"; continue - done - for _patches in "$2/"*; do - [ ! -L "$_patches" ] && [ -d "$_patches" ] && \ - git_am_patches "$1" "$_patches"; continue - done + "$_patch" || $err "$1 $2: !git am $_patch" + [ -L "$_patch" ] || [ ! -d "$_patch" ] || \ + git_am_patches "$1" "$_patch"; continue + done; return 0 } link_crossgcc() -- cgit v1.2.1