summaryrefslogtreecommitdiff
path: root/include/git.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-30 18:14:58 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-30 18:16:34 +0100
commit5882056a27b91e4b947951501c8dbee9b811c4a5 (patch)
treeb6f760c0e6af38afd7f4a4bc8ba2dbdb42c44275 /include/git.sh
parent67421a21fd3a8e0cc6909ca4d96eaa875dd544d7 (diff)
git.sh: merge for loops in git_am_patches()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/git.sh')
-rwxr-xr-xinclude/git.sh10
1 files 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()