aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-08-24 19:59:47 +0000
committerMark Johnston <markj@FreeBSD.org>2022-08-24 20:54:41 +0000
commitc4d06691c04c569e163b771b99734bfcadac39fd (patch)
tree90528e8ca77ee646e473af41175bf6a9a88d7763 /tools
parent43d0c4d2a2d9b4839b18a2ed08a1cb976e8da287 (diff)
downloadsrc-c4d06691c04c569e163b771b99734bfcadac39fd.tar.gz
src-c4d06691c04c569e163b771b99734bfcadac39fd.zip
git-arc: Respect GIT_EDITOR and GIT_PAGER
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/git/git-arc.sh10
1 files changed, 10 insertions, 0 deletions
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