summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-09-22 12:59:18 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-09-26 01:16:59 +0100
commit1d74cb1f1941d3a95a9fb0b9180c796f16c0d5b1 (patch)
tree1aeb7bc6d67f3ac61e0f713b462b9fb6b138cdc7 /dgit
parentf0b1c57b5f6841834c085f618b2bf70e512ad914 (diff)
Split brain: Better tag format filtering
The code only makes tag formats `old' and `new'. Make it easier to add a new tag format config item entry later. No functional change with existing configurations. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit5
1 files changed, 4 insertions, 1 deletions
diff --git a/dgit b/dgit
index 216a9c3..5dfd97c 100755
--- a/dgit
+++ b/dgit
@@ -534,6 +534,9 @@ our %defcfg = ('dgit.default.distro' => 'debian',
'dgit.default.archive-query' => 'madison:',
'dgit.default.sshpsql-dbname' => 'service=projectb',
'dgit.default.dgit-tag-format' => 'old,new,maint',
+ # old means "repo server accepts pushes with old dgit tags"
+ # new means "repo server accepts pushes with new dgit tags"
+ # maint means "repo server accepts split brain pushes"
'dgit-distro.debian.archive-query' => 'ftpmasterapi:',
'dgit-distro.debian.git-check' => 'url',
'dgit-distro.debian.git-check-suffix' => '/info/refs',
@@ -1194,7 +1197,7 @@ sub select_tagformat () {
die 'bug' if $tagformatfn && $tagformat_want;
# ... $tagformat_want assigned after previous select_tagformat
- my (@supported) = grep { $_ ne 'maint' } access_cfg_tagformats();
+ my (@supported) = grep { $_ =~ m/^(?:old|new)$/ } access_cfg_tagformats();
printdebug "select_tagformat supported @supported\n";
$tagformat_want //= [ $supported[0], "distro access configuration", 0 ];