chiark / gitweb /
Use the topological order when exporting explicitly listed branches.
[topgit.git] / tg-export.sh
index 52af88d..037b991 100644 (file)
@@ -181,9 +181,9 @@ if [ -z "$branches" ]; then
        recurse_deps driver "$name"
        (_ret=0; _dep="$name"; _name=""; _dep_is_tgish=1; driver)
 else
-       echo "$branches" | tr ',' '\n' | while read _dep; do
-               _dep_is_tgish=1
-               $driver
+       echo "$branches" | tr ',' '\n' | while read name; do
+               recurse_deps driver "$name"
+               (_ret=0; _dep="$name"; _name=""; _dep_is_tgish=1; driver)
        done
        name="$(echo "$branches" | sed 's/.*,//')"
 fi