Merge branch 'js/info-man-path'
* js/info-man-path: Documentation: clarify meaning of --html-path, --man-path, and --info-path git: add --info-path and --man-path options Conflicts: Makefile
This commit is contained in:
commit
606ee4be54
@ -9,7 +9,7 @@ git - the stupid content tracker
|
|||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
[verse]
|
[verse]
|
||||||
'git' [--version] [--exec-path[=<path>]] [--html-path]
|
'git' [--version] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
|
||||||
[-p|--paginate|--no-pager] [--no-replace-objects]
|
[-p|--paginate|--no-pager] [--no-replace-objects]
|
||||||
[--bare] [--git-dir=<path>] [--work-tree=<path>]
|
[--bare] [--git-dir=<path>] [--work-tree=<path>]
|
||||||
[-c <name>=<value>]
|
[-c <name>=<value>]
|
||||||
@ -288,8 +288,16 @@ help ...`.
|
|||||||
the current setting and then exit.
|
the current setting and then exit.
|
||||||
|
|
||||||
--html-path::
|
--html-path::
|
||||||
Print the path to wherever your git HTML documentation is installed
|
Print the path, without trailing slash, where git's HTML
|
||||||
and exit.
|
documentation is installed and exit.
|
||||||
|
|
||||||
|
--man-path::
|
||||||
|
Print the manpath (see `man(1)`) for the man pages for
|
||||||
|
this version of git and exit.
|
||||||
|
|
||||||
|
--info-path::
|
||||||
|
Print the path where the Info files documenting this
|
||||||
|
version of git are installed and exit.
|
||||||
|
|
||||||
-p::
|
-p::
|
||||||
--paginate::
|
--paginate::
|
||||||
|
4
Makefile
4
Makefile
@ -1680,7 +1680,9 @@ strip: $(PROGRAMS) git$X
|
|||||||
|
|
||||||
git.o: common-cmds.h
|
git.o: common-cmds.h
|
||||||
git.sp git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='"$(GIT_VERSION)"' \
|
git.sp git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='"$(GIT_VERSION)"' \
|
||||||
'-DGIT_HTML_PATH="$(htmldir_SQ)"'
|
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
|
||||||
|
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
|
||||||
|
'-DGIT_INFO_PATH="$(infodir_SQ)"'
|
||||||
|
|
||||||
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
|
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
|
||||||
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
|
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
|
||||||
|
8
git.c
8
git.c
@ -6,7 +6,7 @@
|
|||||||
#include "run-command.h"
|
#include "run-command.h"
|
||||||
|
|
||||||
const char git_usage_string[] =
|
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"
|
" [-p|--paginate|--no-pager] [--no-replace-objects]\n"
|
||||||
" [--bare] [--git-dir=<path>] [--work-tree=<path>]\n"
|
" [--bare] [--git-dir=<path>] [--work-tree=<path>]\n"
|
||||||
" [-c name=value] [--help]\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")) {
|
} else if (!strcmp(cmd, "--html-path")) {
|
||||||
puts(system_path(GIT_HTML_PATH));
|
puts(system_path(GIT_HTML_PATH));
|
||||||
exit(0);
|
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")) {
|
} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
|
||||||
use_pager = 1;
|
use_pager = 1;
|
||||||
} else if (!strcmp(cmd, "--no-pager")) {
|
} else if (!strcmp(cmd, "--no-pager")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user