diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-07-17 09:31:41 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2019-07-17 14:12:27 +0100 |
commit | ae83d742219963877aad83685460f6726d715313 (patch) | |
tree | 53bbbc4a9a9964e1637b7da45a23f6510c3ce7b3 /git-debpush | |
parent | 214f8cb90d08f2ca3fe9e6d7db6bf6eb6528650e (diff) |
git-debpush: check that upstream tag is ancestor of $branch
Closes: #932096
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'git-debpush')
-rwxr-xr-x | git-debpush | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-debpush b/git-debpush index 80594f5..39ff410 100755 --- a/git-debpush +++ b/git-debpush @@ -278,6 +278,14 @@ if ! [ "x$last_debian_tag" = "x" ]; then 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 |