chiark / gitweb /
Split tags: Preparation: Break out access_cfg_tagformats
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 Jul 2016 16:45:18 +0000 (17:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Sep 2016 12:41:47 +0000 (13:41 +0100)
No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 495a043..7306d7d 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1134,13 +1134,17 @@ sub archive_query_dummycat ($$) {
 
 #---------- tag format handling ----------
 
+sub access_cfg_tagformats () {
+    split /\,/, access_cfg('dgit-tag-format');
+}
+
 sub select_tagformat () {
     # sets $tagformatfn
     return if $tagformatfn && !$tagformat_want;
     die 'bug' if $tagformatfn && $tagformat_want;
     # ... $tagformat_want assigned after previous select_tagformat
 
-    my (@supported) = split /\,/, access_cfg('dgit-tag-format');
+    my (@supported) = access_cfg_tagformats();
     printdebug "select_tagformat supported @supported\n";
 
     $tagformat_want //= [ $supported[0], "distro access configuration", 0 ];