chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit: Break out access_cfg_tagformats_can_splitbrain
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index c280016afef17477fdb0adf92f7719fd4db8de77..1a23d1a712c52ce528cf62dca26cb054a84e6960 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-1519,6
+1519,15
@@
sub access_cfg_tagformats () {
split /\,/, access_cfg('dgit-tag-format');
}
split /\,/, access_cfg('dgit-tag-format');
}
+sub access_cfg_tagformats_can_splitbrain () {
+ my %y = map { $_ => 1 } access_cfg_tagformats;
+ foreach my $needtf (qw(new maint)) {
+ next if $y{$needtf};
+ return 0;
+ }
+ return 1;
+}
+
sub need_tagformat ($$) {
my ($fmt, $why) = @_;
fail "need to use tag format $fmt ($why) but also need".
sub need_tagformat ($$) {
my ($fmt, $why) = @_;
fail "need to use tag format $fmt ($why) but also need".
@@
-4912,13
+4921,10
@@
sub build_maybe_quilt_fixup () {
check_for_vendor_patches();
if (quiltmode_splitbrain) {
check_for_vendor_patches();
if (quiltmode_splitbrain) {
- foreach my $needtf (qw(new maint)) {
- next if grep { $_ eq $needtf } access_cfg_tagformats;
- fail <<END
+ fail <<END unless access_cfg_tagformats_can_splitbrain;
quilt mode $quilt_mode requires split view so server needs to support
both "new" and "maint" tag formats, but config says it doesn't.
END
quilt mode $quilt_mode requires split view so server needs to support
both "new" and "maint" tag formats, but config says it doesn't.
END
- }
}
my $clogp = parsechangelog();
}
my $clogp = parsechangelog();