From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F15DE1382C5 for ; Fri, 5 Jun 2020 05:28:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BD5DE093D; Fri, 5 Jun 2020 05:28:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 13F24E093D for ; Fri, 5 Jun 2020 05:28:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 021D634F20C for ; Fri, 5 Jun 2020 05:28:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7C4DD31 for ; Fri, 5 Jun 2020 05:28:40 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1591334910.47b6900c425614d4ba22223c13a23920f0618d9f.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: plugin/ X-VCS-Repository: proj/gentoo-syntax X-VCS-Files: plugin/gentoo-common.vim X-VCS-Directories: plugin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 47b6900c425614d4ba22223c13a23920f0618d9f X-VCS-Branch: master Date: Fri, 5 Jun 2020 05:28:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: deb014e2-09e8-4f38-9821-daf8ca4cdea5 X-Archives-Hash: cfd9c0bc84d1027f9f5f5e3a8476b691 commit: 47b6900c425614d4ba22223c13a23920f0618d9f Author: Freed-Wu qq com> AuthorDate: Fri Jun 5 00:12:56 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Jun 5 05:28:30 2020 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=47b6900c Fix error when executable('git') == 1 Closes: https://github.com/gentoo/gentoo-syntax/pull/30 Signed-off-by: Michał Górny gentoo.org> plugin/gentoo-common.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/gentoo-common.vim b/plugin/gentoo-common.vim index a0fe9cc..a15636a 100644 --- a/plugin/gentoo-common.vim +++ b/plugin/gentoo-common.vim @@ -13,8 +13,8 @@ let g:loaded_gentoo_common=1 fun! GentooGetUser() let l:result = expand("\$ECHANGELOG_USER") if l:result ==# "\$ECHANGELOG_USER" - let l:email = system('git config --global user.email') - let l:name = system('git config --global user.name') + let l:email = executable('git') ? system('git config --global user.email') : expand('$HOST') + let l:name = executable('git') ? system('git config --global user.name') : expand('$USER') let l:result = l:name . ' <' . l:email . '>' endif return l:result