chiark / gitweb /
Make configuration able to prevent dpkg-mergechangelogs setup.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index ae96531e38072c586035a080e9db3f7fd0c4d399..a935cbfacb470e103ca0d05497ec2f44cdf908c2 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1638,7 +1638,10 @@ sub set_local_git_config ($$) {
     runcmd @git, qw(config), $k, $v;
 }
 
-sub setup_mergechangelogs () {
+sub setup_mergechangelogs (;$) {
+    my ($always) = @_;
+    return unless $always || access_cfg_bool(1, 'setup-mergechangelogs');
+
     my $driver = 'dpkg-mergechangelogs';
     my $cb = "merge.$driver";
     my $attrs = '.git/info/attributes';
@@ -3021,7 +3024,7 @@ sub cmd_clone_dgit_repos_server {
 
 sub cmd_setup_mergechangelogs {
     badusage "no arguments allowed to dgit setup-mergechangelogs" if @ARGV;
-    setup_mergechangelogs();
+    setup_mergechangelogs(1);
 }
 
 #---------- argument parsing and main program ----------