summaryrefslogtreecommitdiff
path: root/Debian/Dgit.pm
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-05-28 22:01:22 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-05-28 22:04:01 +0100
commit5c492172d81bfa64cf5f526c862171d3cbdba208 (patch)
tree66cc0436b555e7187153cce60453b866a3a1155d /Debian/Dgit.pm
parent2193986701afbcbe90b2fcc9e51e52da41b01660 (diff)
dgit/gdr: playtrees: Provide function for gbp.conf
git-debrebase wants to mess with this. The config file is a way to pass options that doesn't rely on them actually being supported. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'Debian/Dgit.pm')
-rw-r--r--Debian/Dgit.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index a530f0f..829725c 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -84,7 +84,7 @@ BEGIN {
gdr_ffq_prev_branchinfo
parsecontrolfh parsecontrol parsechangelog
getfield parsechangelog_loop
- playtree_setup);
+ playtree_setup playtree_write_gbp_conf);
# implicitly uses $main::us
%EXPORT_TAGS = ( policyflags => [qw(NOFFCHECK FRESHREPO NOCOMMITCHECK)],
playground => [qw(record_maindir $maindir $local_git_cfg
@@ -1078,10 +1078,17 @@ sub playtree_setup () {
print GA "* $negate_harmful_gitattrs\n" or confess "$!";
close GA or confess "$!";
+ playtree_write_gbp_conf();
+}
+
+sub playtree_write_gbp_conf (;$) {
+ my ($ignore_new) = @_;
+ $ignore_new //= 'false';
+
open GC, "> .git/gbp.conf" or confess "$!";
- print GC <<'END' or confess $!;
+ print GC <<"END" or confess $!;
[pq]
-ignore-new = false
+ignore-new = $ignore_new
END
close GC or confess "$!";
}