From 089265a306c58b52a0f90dde99b7cc6af3f25e11 Mon Sep 17 00:00:00 2001 From: Andrew Robbins Date: Tue, 16 Jul 2019 22:38:34 -0500 Subject: Avoid redundant patching when recursively patching If a path is not supplied to project_sources_patch_recursive() or git_project_patch_recursive() then it will attempt to apply the set of patches located at $PROJECTS/$project/$PATCHES (the top-level patches directory) twice. Checking to see if $path is of non-zero length avoids this issue. --- libs/git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/git') diff --git a/libs/git b/libs/git index 429d4783..2cde3dd3 100755 --- a/libs/git +++ b/libs/git @@ -312,7 +312,7 @@ git_project_patch_recursive() { git_patch "$repository_path" "$branch" "$patch" || return 1 done - if [[ $path != . ]]; then + if [[ -n $path && $path != . ]]; then git_project_patch_recursive "$project" "$repository" "$branch" "$(dirname "$path")" fi } -- cgit v1.2.3-70-g09d2