chiark / gitweb /
test suite: dpkgsourceignores-docs: Use print-dpkg-source-ignores
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 6c1d5bc15e52d51187fb9d9b964e9de2514ab7c6..3c94f036ac144da9742718a75745ac1dc6b6e53a 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -100,6 +100,8 @@ our $git_authline_re = '^([^<>]+) \<(\S+)\> (\d+ [-+]\d+)$';
 our $splitbraincache = 'dgit-intern/quilt-cache';
 our $rewritemap = 'dgit-rewrite/map';
 
+our @dpkg_source_ignores = qw(-i\.git/ -I.git);
+
 our (@git) = qw(git);
 our (@dget) = qw(dget);
 our (@curl) = (qw(curl --proto-redir), '-all,http,https', qw(-L));
@@ -111,8 +113,8 @@ our (@ssh) = 'ssh';
 our (@dgit) = qw(dgit);
 our (@aptget) = qw(apt-get);
 our (@aptcache) = qw(apt-cache);
-our (@dpkgbuildpackage) = qw(dpkg-buildpackage -i\.git/ -I.git);
-our (@dpkgsource) = qw(dpkg-source -i\.git/ -I.git);
+our (@dpkgbuildpackage) = (qw(dpkg-buildpackage), @dpkg_source_ignores);
+our (@dpkgsource) = (qw(dpkg-source), @dpkg_source_ignores);
 our (@dpkggenchanges) = qw(dpkg-genchanges);
 our (@mergechanges) = qw(mergechanges -f);
 our (@gbp_build) = ('');
@@ -985,7 +987,7 @@ sub commit_getclogp ($) {
     my $memo = $commit_getclogp_memo{$objid};
     return $memo if $memo;
     
-    my $mclog = dgit_privdir()."clog-$objid";
+    my $mclog = dgit_privdir()."clog";
     runcmd shell_cmd "exec >$mclog", @git, qw(cat-file blob),
        "$objid:debian/changelog";
     $commit_getclogp_memo{$objid} = parsechangelog("-l$mclog");
@@ -3314,6 +3316,7 @@ sub ensure_setup_existing_tree () {
 }
 
 sub open_main_gitattrs () {
+    confess 'internal error no maindir' unless defined $maindir;
     my $gai = new IO::File "$maindir_gitcommon/info/attributes"
        or $!==ENOENT
        or die "open $maindir_gitcommon/info/attributes: $!";
@@ -6422,6 +6425,15 @@ sub cmd_print_dgit_repos_server_source_url {
     print $url, "\n" or die $!;
 }
 
+sub pre_print_dpkg_source_ignores {
+    not_necessarily_a_tree();
+}
+sub cmd_print_dpkg_source_ignores {
+    badusage "no arguments allowed to dgit print-dpkg-source-ignores"
+       if @ARGV;
+    print "@dpkg_source_ignores\n" or die $!;
+}
+
 sub cmd_setup_mergechangelogs {
     badusage "no arguments allowed to dgit setup-mergechangelogs" if @ARGV;
     local $isuite = 'DGIT-SETUP-TREE';