chiark / gitweb /
Dgit.pm: Move upstream_commitish_search from git-debrebase
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 16:29:02 +0000 (17:29 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 23:43:18 +0000 (00:43 +0100)
No functional change.

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

index 455cb10..892ebf9 100644 (file)
@@ -45,7 +45,7 @@ BEGIN {
                      dep14_version_mangle
                       debiantags debiantag_new
                      debiantag_maintview
-                     upstreamversion
+                     upstreamversion upstream_commitish_search
                      stripepoch source_file_leafname is_orig_file_of_p_v
                      server_branch server_ref
                       stat_exists link_ltarget rename_link_xf
@@ -617,6 +617,17 @@ sub git_check_unmodified () {
     }
 }
 
+sub upstream_commitish_search ($$) {
+    my ($upstream_version, $tried) = @_;
+    # todo: at some point maybe use git-deborig to do this
+    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;
+    }
+}
+
 sub is_fast_fwd ($$) {
     my ($ancestor,$child) = @_;
     my @cmd = (qw(git merge-base), $ancestor, $child);
index 71bf39d..eb585e3 100755 (executable)
@@ -1994,17 +1994,6 @@ sub do_stitch ($;$) {
     stitch($dangling_head, $ffq_prev, $gdrlast, $ffq_prev_commitish, $prose);
 }
 
-sub upstream_commitish_search ($$) {
-    my ($upstream_version, $tried) = @_;
-    # todo: at some point maybe use git-deborig to do this
-    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;
-    }
-}
-
 sub resolve_upstream_version ($$) {
     my ($new_upstream, $upstream_version) = @_;