From 5c492172d81bfa64cf5f526c862171d3cbdba208 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 28 May 2022 22:01:22 +0100 Subject: 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 --- Debian/Dgit.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Debian') 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 "$!"; } -- cgit v1.2.3