]> git.ozlabs.org Git - next-scripts/commitdiff
make_tree_file: get_branches only returns git branches
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 1 Sep 2025 00:36:07 +0000 (10:36 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 1 Sep 2025 00:36:07 +0000 (10:36 +1000)
Also, just ignore local branches

make_tree_file

index a6a8b086be1caaa388bdd253514acb16e5963911..cffe98ac5b003951fbb2d411ddcceea79fefeead 100755 (executable)
@@ -23,17 +23,19 @@ mkdir Next
        printf '%s%s%s\n' 'Name' "$tab" 'Url'
        printf '%s%s%s\n' '----' "$tab" '---'
 
+       # Use get_branches "$@" if function's $1 should mean script's $1
+       # shellcheck disable=SC2119
        for name in $(get_branches); do
                tab="$_TAB"
                if [ ${#name} -lt 8 ]; then
                        tab="$tab$_TAB"
                fi
-               type=$(get_type "$name")
                url=$(get_url "$name")
-               if [ "$type" = "git" ] && ! [ "$url" = 'linux-next' ]; then
-                       ref=$(get_remote_branch "$name")
-                       url="$url#$ref"
+               if [ "$url" = 'linux-next' ]; then
+                       continue
                fi
+               ref=$(get_remote_branch "$name")
+               url="$url#$ref"
                printf '%s%s%s\n' "$name" "$tab" "$url"
        done
 ) >Next/Trees