From de731fd317951e49dd6d87e8669680896277e820 Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sun, 24 Nov 2019 01:51:19 +0100 Subject: [PATCH 1/2] options: Add TIGRC_EXTRA --- src/options.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/options.c b/src/options.c index cb1177a8d..352af67a2 100644 --- a/src/options.c +++ b/src/options.c @@ -1013,6 +1013,7 @@ enum status_code load_options(void) { const char *tigrc_user = getenv("TIGRC_USER"); + const char *tigrc_extra = getenv("TIGRC_EXTRA"); const char *tigrc_system = getenv("TIGRC_SYSTEM"); const char *tig_diff_opts = getenv("TIG_DIFF_OPTS"); const bool diff_opts_from_args = !!opt_diff_options; @@ -1053,6 +1054,10 @@ load_options(void) load_option_file(TIG_USER_CONFIG); } + if (tigrc_extra) { + load_option_file(tigrc_extra); + } + if (!diff_opts_from_args && tig_diff_opts && *tig_diff_opts) { static const char *diff_opts[SIZEOF_ARG] = { NULL }; char buf[SIZEOF_STR]; From ae59c5acfc815264642bedc7db552b9c07b7d72a Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Sun, 24 Nov 2019 01:54:20 +0100 Subject: [PATCH 2/2] manual.adoc,tig.1.adoc: Add description of the TIGRC_EXTRA variable --- doc/manual.adoc | 3 +++ doc/tig.1.adoc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/doc/manual.adoc b/doc/manual.adoc index cf87ba185..fc1d8c1aa 100644 --- a/doc/manual.adoc +++ b/doc/manual.adoc @@ -264,6 +264,9 @@ TIGRC_USER:: TIGRC_SYSTEM:: Path of the system wide configuration file. +TIGRC_EXTRA:: + Path of the additional configuration file. + [[history-files]] History Files ~~~~~~~~~~~~~ diff --git a/doc/tig.1.adoc b/doc/tig.1.adoc index 30b60e31b..e0919dae5 100644 --- a/doc/tig.1.adoc +++ b/doc/tig.1.adoc @@ -206,6 +206,9 @@ TIGRC_SYSTEM:: `{sysconfdir}/tigrc`). Define to empty string to use built-in configuration. +TIGRC_EXTRA:: + Path of the additional configuration file. + TIG_LS_REMOTE:: Command for retrieving all repository references. The command should output data in the same format as git-ls-remote(1).