chiark / gitweb /
Update copyright notices in many files
[dgit.git] / Debian / Dgit.pm
index a5030df78c86b1cc0e562454040505accc4a7079..4f9aac925076789129958d4d4455fc63b400250e 100644 (file)
@@ -2,7 +2,7 @@
 # dgit
 # Debian::Dgit: functions common to dgit and its helpers and servers
 #
-# Copyright (C) 2015-2016  Ian Jackson
+# Copyright (C) 2015-2019  Ian Jackson
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -219,9 +219,7 @@ sub shellquote {
 sub printcmd {
     my $fh = shift @_;
     my $intro = shift @_;
-    print $fh $intro," " or confess "$!";
-    print $fh shellquote @_ or confess "$!";
-    print $fh "\n" or confess "$!";
+    print $fh $intro." ".(join '', shellquote @_)."\n" or confess "$!";
 }
 
 sub debugcmd {
@@ -656,7 +654,10 @@ sub resolve_upstream_version ($$) {
        }
        $used = $tried[-1];
        $message = f_ 'using upstream from git tag %s', $used;
-    }
+    } elsif ($new_upstream =~ m{^refs/tags/($versiontag_re)$}s) {
+       $message = f_ 'using upstream from git tag %s', $1;
+       $used = $1;
+    }  
     $new_upstream = git_rev_parse $new_upstream;
 
     return ($new_upstream, $used, $message);