]> git.ozlabs.org Git - next-scripts/commitdiff
fetch_trees: we only fetch git trees now
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 13 Aug 2025 06:37:16 +0000 (16:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 13 Aug 2025 06:37:16 +0000 (16:37 +1000)
fetch_trees

index 48599f81b8450b70004bc57e4f8c0010214a9be2..50810c7f164bfee734e4185704cb64d2844dd859 100755 (executable)
@@ -65,22 +65,23 @@ for name in $trees; do
                printf '%s: unknown tree\n' "$name" 1>&2
                continue
        fi
+       if ! [ "$type" = 'git' ]; then
+               continue
+       fi
 
        if [ "$(get_url "$name")" = 'linux-next' ]; then
                continue
        fi
 
-       printf '%s: %s\n' "$name" "$type"
-       fun="fetch_$type"
-       tfun=$(type -t "$fun")
-       if [ "$tfun" = 'function' ]; then
-               branch=$(get_remote_branch "$name")
-               old_sha=$(git rev-parse --quiet --verify "$name/$branch")
-               new_sha=$("$fun" "$name" "$branch" "$old_sha")
-               check_dups "$name" origin/master "$new_sha"
-               if ! [ "$new_sha" = "$old_sha" ]; then
-                       "$tools_dir"/check_commits ^origin/master "$old_sha..$new_sha"
-               fi
+       printf '%s\n' "$name"
+
+       branch=$(get_remote_branch "$name")
+       old_sha=$(git rev-parse --quiet --verify "$name/$branch")
+       new_sha=$(fetch_git "$name" "$branch" "$old_sha")
+
+       check_dups "$name" origin/master "$new_sha"
+       if ! [ "$new_sha" = "$old_sha" ]; then
+               "$tools_dir"/check_commits ^origin/master "$old_sha..$new_sha"
        fi
 done