diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-27 13:49:07 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-05-27 17:55:22 -0700 |
commit | 0bb8e2a87e3c8b5be0fce5c2491b292e9273056e (patch) | |
tree | 6d2eed19da0d69101b4e7c5e515b8496b59ab3b9 /Debian | |
parent | f72c5db7d8b587facc24999af1d2fd03f2026d1a (diff) |
Dgit::upstream_commitish_search: fail if more than one tag exists
We should not assume we know which the user wants to merge, as
git-deborig does not.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Reported-by: David Bremner <bremner@debian.org>
Reviewed-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Dgit.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 5d898ae..4e19657 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -634,12 +634,14 @@ sub git_check_unmodified () { sub upstream_commitish_search ($$) { my ($upstream_version, $tried) = @_; # todo: at some point maybe use git-deborig to do this + my @found; foreach my $tagpfx ('', 'v', 'upstream/') { my $tag = $tagpfx.(dep14_version_mangle $upstream_version); my $new_upstream = git_get_ref "refs/tags/$tag"; push @$tried, $tag; - return $new_upstream if length $new_upstream; + push @found, $tag if $new_upstream; } + return $found[0] if @found == 1; } sub resolve_upstream_version ($$) { |