chiark / gitweb /
Dgit.pm: resolve_upstream_version: Return a message too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 29 Jun 2019 00:56:21 +0000 (01:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 29 Jun 2019 00:57:37 +0000 (01:57 +0100)
No functional change for existing callers.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm

index 22cef21..d60de77 100644 (file)
@@ -635,6 +635,7 @@ sub resolve_upstream_version ($$) {
     my ($new_upstream, $upstream_version) = @_;
 
     my $used = $new_upstream;
+    my $message = __ 'using specified upstream commitish';
     if (!defined $new_upstream) {
        my @tried;
        $new_upstream = upstream_commitish_search $upstream_version, \@tried;
@@ -646,10 +647,11 @@ sub resolve_upstream_version ($$) {
                "@tried";
        }
        $used = $tried[-1];
+       $message = f_ 'using upstream from git tag %s', $used;
     }
     $new_upstream = git_rev_parse $new_upstream;
 
-    return ($new_upstream, $used);
+    return ($new_upstream, $used, $message);
     # used is a human-readable idea of what we found
 }