aboutsummaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJon Seymour <jon.seymour@gmail.com>2011-05-01 18:16:25 +1000
committerJunio C Hamano <gitster@pobox.com>2011-05-01 21:50:04 -0700
commitf2dd8c3799ddbd7df63a89a9043916f8545a70a3 (patch)
tree99ba7774cc8c60bef70f107c731ee02cbd0643ce /git.c
parentec014eac0e9e6f30cbbca616090fa2ecf74797e7 (diff)
downloadgit-f2dd8c3799ddbd7df63a89a9043916f8545a70a3.tar.gz
git-f2dd8c3799ddbd7df63a89a9043916f8545a70a3.tar.xz
git: add --info-path and --man-path options
Similar to the way the --html-path option lets UI programs learn where git has its HTML documentation pages, expose the other two paths used to store the documentation pages of these two types. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/git.c b/git.c
index ef598c3e7..60a940377 100644
--- a/git.c
+++ b/git.c
@@ -6,7 +6,7 @@
#include "run-command.h"
const char git_usage_string[] =
- "git [--version] [--exec-path[=<path>]] [--html-path]\n"
+ "git [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n"
" [-p|--paginate|--no-pager] [--no-replace-objects]\n"
" [--bare] [--git-dir=<path>] [--work-tree=<path>]\n"
" [-c name=value] [--help]\n"
@@ -95,6 +95,12 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
} else if (!strcmp(cmd, "--html-path")) {
puts(system_path(GIT_HTML_PATH));
exit(0);
+ } else if (!strcmp(cmd, "--man-path")) {
+ puts(system_path(GIT_MAN_PATH));
+ exit(0);
+ } else if (!strcmp(cmd, "--info-path")) {
+ puts(system_path(GIT_INFO_PATH));
+ exit(0);
} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
use_pager = 1;
} else if (!strcmp(cmd, "--no-pager")) {