Skip to content

Commit

Permalink
initialize subdirectory variable
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Rickard <[email protected]>
  • Loading branch information
jeremyrickard committed Nov 22, 2023
1 parent 1d2085b commit 18a0f27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions artifacts/scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ sync_repo() {

# does ${subdirectories} exist at ${k_branch_point_commit}? If not it was introduced to the branch via some fast-forward merge.
# we use the fast-forward merge commit's second parent (on master) as branch point.
subdirectory=${subdirectories}
if [ $(git ls-tree --name-only -r ${k_branch_point_commit} -- "${subdirectory}" | wc -l) = 0 ]; then
echo "Subdirectory ${subdirectory} did not exist at branch point ${k_branch_point_commit}. Looking for fast-forward merge introducing it."
last_with_subdir=$(git rev-list upstream/${src_branch} --first-parent --remove-empty -- "${subdirectory}" | tail -1)
Expand Down

0 comments on commit 18a0f27

Please sign in to comment.