chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: Document changes for tagupl-gbp
[dgit.git]
/
git-debpush
diff --git
a/git-debpush
b/git-debpush
index 80594f5cd0c5f392521fa6c77a052792abb048f2..0ddbfc47301f331a87b3f4a4db219e4d7db5c7ef 100755
(executable)
--- a/
git-debpush
+++ b/
git-debpush
@@
-140,7
+140,7
@@
esac
# ---- Gather git information
remoteconfigs=()
# ---- Gather git information
remoteconfigs=()
-
push_branc
h=()
+
to_pus
h=()
# 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)"
@@
-167,7
+167,7
@@
esac
case "$branch" in
refs/heads/*)
b=${branch#refs/heads/}
case "$branch" in
refs/heads/*)
b=${branch#refs/heads/}
-
push_branc
h+=("$b")
+
to_pus
h+=("$b")
remoteconfigs+=( branch.$b.pushRemote branch.$b.remote )
;;
esac
remoteconfigs+=( branch.$b.pushRemote branch.$b.remote )
;;
esac
@@
-244,6
+244,7
@@
if $upstream; then
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
@@
-278,6
+279,14
@@
if ! [ "x$last_debian_tag" = "x" ]; then
fi
fi
fi
fi
+if ! [ "x$upstream_tag" = "x" ] \
+ && ! git merge-base --is-ancestor "$upstream_tag" "$branch" \
+ && ! [ "$quilt_mode" = "baredebian" ]; then
+ fail_check \
+ "upstream tag $upstream_tag is not an ancestor of $branch; probably a mistake"
+fi
+
+
if ! $force && $failed_check; then
fail "some checks failed; you can override with --force"
fi
if ! $force && $failed_check; then
fail "some checks failed; you can override with --force"
fi
@@
-288,6
+297,7
@@
fi
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
@@
-323,9
+333,5
@@
EOF
# ---- 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[@]}"
fi
fi