No functional change.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
# ---- Gather git information
remoteconfigs=()
# ---- Gather git information
remoteconfigs=()
# Maybe $branch is a symbolic ref. If so, resolve it
branchref="$(git symbolic-ref -q $branch || test $? = 1)"
# Maybe $branch is a symbolic ref. If so, resolve it
branchref="$(git symbolic-ref -q $branch || test $? = 1)"
case "$branch" in
refs/heads/*)
b=${branch#refs/heads/}
case "$branch" in
refs/heads/*)
b=${branch#refs/heads/}
remoteconfigs+=( branch.$b.pushRemote branch.$b.remote )
;;
esac
remoteconfigs+=( branch.$b.pushRemote branch.$b.remote )
;;
esac
fi
upstream_committish=$(git rev-parse "refs/tags/${upstream_tag}"^{})
upstream_info=" upstream-tag=$upstream_tag upstream=$upstream_committish"
fi
upstream_committish=$(git rev-parse "refs/tags/${upstream_tag}"^{})
upstream_info=" upstream-tag=$upstream_tag upstream=$upstream_committish"
+ to_push+=("$upstream_tag")
fi
# ---- Useful sanity checks
fi
# ---- Useful sanity checks
git_version=$(echo $version | tr ':~' '%_' | sed 's/\.(?=\.|$|lock$)/.#/g')
debian_tag="$distro/$git_version"
git_version=$(echo $version | tr ':~' '%_' | sed 's/\.(?=\.|$|lock$)/.#/g')
debian_tag="$distro/$git_version"
+to_push+=("$debian_tag")
# If the user didn't supply a quilt mode, look for it in a previous
# tag made by this script
# If the user didn't supply a quilt mode, look for it in a previous
# tag made by this script
# ---- Do a git push
if $pushing; then
# ---- Do a git push
if $pushing; then
- if [ "x$upstream_tag" = "x" ]; then
- git push "$remote" "${push_branch[@]}" "$debian_tag"
- else
- git push "$remote" "${push_branch[@]}" "$debian_tag" "$upstream_tag"
- fi
+ git push "$remote" "${to_push[@]}"