Skip to content

Commit a4c9d0b

Browse files
committed
Use locals
1 parent b958dbc commit a4c9d0b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.gitlab/find-gh-base-ref.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ fi
4242

4343
get_distance_from_merge_base() {
4444
local candidate_base="$1"
45+
local merge_base_sha
46+
local distance
4547
merge_base_sha=$(git merge-base "$candidate_base" HEAD)
4648
distance=$(git rev-list --count "$merge_base_sha".."$CURRENT_HEAD_SHA")
4749
echo "Distance from $candidate_base is $distance" >&2

0 commit comments

Comments
 (0)