git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] configure: add settings for gitconfig, editor and pager

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Nov 4, 2009, 18:06 UTC
Message-ID
<1257357960-12763-3-git-send-email-bwalton@artsci.utoronto.ca>
In-Reply-To
<1257357960-12763-2-git-send-email-bwalton@artsci.utoronto.ca>

Use the new GIT_PARSE_WITH_SET_MAKE_VAR macro to allow configuration settings for ETC_GITCONFIG, DEFAULT_PAGER and DEFAULT_EDITOR.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
---
 configure.ac |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index a305d0b..78345eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,6 +247,29 @@ GIT_PARSE_WITH(iconv))
 # change being considered an inode change from the update-index perspective.
 
 #
+# Allow user to set ETC_GITCONFIG variable
+GIT_PARSE_WITH_SET_MAKE_VAR(gitconfig, ETC_GITCONFIG,
+			Use VALUE instead of /etc/gitconfig as the
+			global git configuration file.
+			If VALUE is not fully qualified it will be interpretted
+			as a path relative to the computed prefix at runtime.)
+
+#
+# Allow user to set the default pager
+GIT_PARSE_WITH_SET_MAKE_VAR(pager, DEFAULT_PAGER,
+			Use VALUE as the fall-back pager instead of 'less'.
+			This is used by things like 'git log' when the user
+			does not specify a pager to use through alternate
+			methods. eg: /usr/bin/pager)
+#
+# Allow user to set the default editor
+GIT_PARSE_WITH_SET_MAKE_VAR(editor, DEFAULT_EDITOR,
+			Use VALUE as the fall-back editor instead of 'vi'.
+			This is used by things like 'git commit' when the user
+			does not specify a preferred editor through other
+			methods. eg: /usr/bin/editor)
+
+#
 # Define SHELL_PATH to provide path to shell.
 GIT_ARG_SET_PATH(shell)
 #
-- 
1.6.5.1
Previous: Ben WaltonNext: Junio C Hamano
Message 9 of 15 in “Set Makefile variables from configure”
  1. 0/2 Set Makefile variables from configureBen Walton, Oct 31, 2009
  2. 1/2 configure: add function to directly set Makefile variablesBen Walton, Oct 31, 2009
  3. 2/2 configure: allow user to set gitconfig, pager and editorBen Walton, Oct 31, 2009
  4. Ben WaltonNov 3, 2009
  5. Jonathan NiederNov 3, 2009
  6. Jonathan NiederNov 3, 2009
  7. 0/2 Set Makefile variables from configureBen Walton, Nov 4, 2009
  8. 1/2 configure: add macro to set arbitrary make variablesBen Walton, Nov 4, 2009
  9. 2/2 configure: add settings for gitconfig, editor and pagerBen Walton, Nov 4, 2009
  10. Junio C HamanoNov 4, 2009
  11. Ben WaltonNov 4, 2009
  12. Junio C HamanoNov 4, 2009
  13. Ben WaltonNov 4, 2009
  14. Jonathan NiederNov 4, 2009
  15. Ben WaltonNov 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.