1 |
commit: 632d0a72c83cd0ccf7f40cb64470dc84f51bdce2 |
2 |
Author: Freed-Wu <Wuzy01 <AT> qq <DOT> com> |
3 |
AuthorDate: Thu Jun 4 05:28:32 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 4 06:02:21 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=632d0a72 |
7 |
|
8 |
use git config to get email and name of user |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo-syntax/pull/29 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
plugin/gentoo-common.vim | 9 ++++----- |
14 |
1 file changed, 4 insertions(+), 5 deletions(-) |
15 |
|
16 |
diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim |
17 |
index 65a8691..a0fe9cc 100644 |
18 |
--- a/plugin/gentoo-common.vim |
19 |
+++ b/plugin/gentoo-common.vim |
20 |
@@ -13,10 +13,9 @@ let g:loaded_gentoo_common=1 |
21 |
fun! GentooGetUser() |
22 |
let l:result = expand("\$ECHANGELOG_USER") |
23 |
if l:result ==# "\$ECHANGELOG_USER" |
24 |
- let l:result = expand("\$USER") |
25 |
- endif |
26 |
- if l:result ==# "\$USER" |
27 |
- let l:result = "" |
28 |
+ let l:email = system('git config --global user.email') |
29 |
+ let l:name = system('git config --global user.name') |
30 |
+ let l:result = l:name . ' <' . l:email . '>' |
31 |
endif |
32 |
return l:result |
33 |
endfun |
34 |
@@ -71,4 +70,4 @@ fun! GentooGetPythonTargets() |
35 |
endif |
36 |
endfun |
37 |
|
38 |
-" vim: set et foldmethod=marker : " |
39 |
+" vim: set et foldmethod=marker sw=4 ts=4 : " |