commit:     5257c69de9827577e85601b1127edae96012711a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 27 12:52:32 2016 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Sat Mar  5 23:31:09 2016 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=5257c69d

newmetadata: Always put obligatory <maintainer/> parts

Always put <maintainer type="person"/> element with <email/> subelement
since some maintainer is always desired, and <email/> is obligatory.
Worst case, we'd be outputting placeholder to fill.

 plugin/newmetadata.vim | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/plugin/newmetadata.vim b/plugin/newmetadata.vim
index f9efeb4..b013d95 100644
--- a/plugin/newmetadata.vim
+++ b/plugin/newmetadata.vim
@@ -79,16 +79,12 @@ fun! <SID>MakeNewMetadata()
             put ='<email>' . l:project . '@gentoo.org</email>'
             put ='</maintainer>'
         endif
-        if l:email != "" || l:name != ""
-            put ='<maintainer type=\"person\">'
-            if l:email != ""
-                put ='<email>' . l:email . '</email>'
-            endif
-            if l:name != ""
-                put ='<name>' . l:name . '</name>'
-            endif
-            put ='</maintainer>'
+        put ='<maintainer type=\"person\">'
+        put ='<email>' . l:email . '</email>'
+        if l:name != ""
+            put ='<name>' . l:name . '</name>'
         endif
+        put ='</maintainer>'
         put ='<longdescription lang=\"en\">'
         put ='</longdescription>'
         put ='</pkgmetadata>'

Reply via email to