chiark / gitweb /
Make mk_orig_file have capability to be selective on source package and version
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 27 Oct 2014 17:43:58 +0000 (17:43 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 5 Nov 2014 18:02:50 +0000 (18:02 +0000)
dgit

diff --git a/dgit b/dgit
index b13b5ed..e74445b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1028,9 +1028,12 @@ sub dsc_files () {
     map { $_->{Filename} } dsc_files_info();
 }
 
-sub is_orig_file ($) {
-    local ($_) = @_;
-    m/\.orig(?:-\w+)?\.tar\.\w+$/;
+sub is_orig_file ($;$) {
+    local ($_) = $_[0];
+    my $base = $_[1];
+    m/\.orig(?:-\w+)?\.tar\.\w+$/ or return 0;
+    defined $base or return 1;
+    return $` eq $base;
 }
 
 sub make_commit ($) {