chiark / gitweb /
Merge commit 'refs/top-bases/i/basis-merge' into i/basis-merge
[topgit.git] / tg-push.sh
index cd208a06413878de19fde4eb166717158a44c4e6..a928fba8e9e93a522f966004bea28c0c6fc1fe07 100644 (file)
@@ -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"