X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tg-push.sh;h=a928fba8e9e93a522f966004bea28c0c6fc1fe07;hb=dbebcfd2df6ef25be83125515491e35c25e07668;hp=8e1b43fdea767f1c2a3e1b90ebfc2ed4343bdbbe;hpb=4f54f29da0f2f7e9f693981b7b78e73d77bec123;p=topgit.git diff --git a/tg-push.sh b/tg-push.sh index 8e1b43f..a928fba 100644 --- a/tg-push.sh +++ b/tg-push.sh @@ -45,14 +45,17 @@ for name in $branches; do ref_exists "$name" || die "detached HEAD? Can't push $name" done -_listfile="$(mktemp -t tg-push-listfile.XXXXXX)" -trap "rm -f \"$_listfile\"" 0 +_listfile="$(get_temp tg-push-listfile)" push_branch() { # if so desired omit non tgish deps $tgish_deps_only && [ -z "$_dep_is_tgish" ] && return 0 + # filter out plain SHA1s. These don't need to be pushed explicitly as + # the patches that depend on the sha1 have it already in their ancestry. + is_sha1 "$_dep" && return 0 + echo "$_dep" >> "$_listfile" [ -z "$_dep_is_tgish" ] || echo "top-bases/$_dep" >> "$_listfile" @@ -67,8 +70,8 @@ for name in $branches; do _dep_is_tgish= push_branch "$name" - # deps - $recurse_deps && + # deps but only if branch is tgish + $recurse_deps && [ -n "$_dep_is_tgish" ] && no_remotes=1 recurse_deps push_branch "$name" # remove multiple occurrences of the same branch