Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Aug 2022 20:54:54 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c4d06691c04c - main - git-arc: Respect GIT_EDITOR and GIT_PAGER
Message-ID:  <202208242054.27OKss1E095669@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=c4d06691c04c569e163b771b99734bfcadac39fd

commit c4d06691c04c569e163b771b99734bfcadac39fd
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-08-24 19:59:47 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-08-24 20:54:41 +0000

    git-arc: Respect GIT_EDITOR and GIT_PAGER
---
 tools/tools/git/git-arc.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
index ab12b887c89d..22a13aa307bd 100644
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -575,6 +575,16 @@ USAGE=
 # shellcheck disable=SC1090
 . "$git_sh_setup"
 
+# git commands use GIT_EDITOR instead of EDITOR, so try to provide consistent
+# behaviour.  Ditto for PAGER.  This makes git-arc play nicer with editor
+# plugins like vim-fugitive.
+if [ -n "$GIT_EDITOR" ]; then
+    EDITOR=$GIT_EDITOR
+fi
+if [ -n "$GIT_PAGER" ]; then
+    PAGER=$GIT_PAGER
+fi
+
 # Bail if the working tree is unclean, except for "list" and "patch"
 # operations.
 case $verb in



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208242054.27OKss1E095669>