summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-10 01:35:29 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-10 01:36:31 -0800
commita149a1a44af45352b63e2dadd790616966c220be (patch)
tree43cd050895442e26fcb074131491ce3cecbc9586
parent78d39f98f3135bc9f7cbef897aeb4a279ca4130e (diff)
downloadgit-a149a1a44af45352b63e2dadd790616966c220be.tar.gz
git-help -i: show info documentation from matching version of git
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile6
-rw-r--r--help.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 429bc1ddb5..f20b8c0092 100644
--- a/Makefile
+++ b/Makefile
@@ -155,6 +155,7 @@ STRIP ?= strip
prefix = $(HOME)
bindir = $(prefix)/bin
mandir = $(prefix)/share/man
+infodir = $(prefix)/share/info
gitexecdir = $(bindir)
sharedir = $(prefix)/share
template_dir = $(sharedir)/git-core/templates
@@ -750,6 +751,7 @@ ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG))
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
bindir_SQ = $(subst ','\'',$(bindir))
mandir_SQ = $(subst ','\'',$(mandir))
+infodir_SQ = $(subst ','\'',$(infodir))
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
template_dir_SQ = $(subst ','\'',$(template_dir))
htmldir_SQ = $(subst ','\'',$(htmldir))
@@ -798,7 +800,9 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
help.o: help.c common-cmds.h GIT-CFLAGS
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) '-DGIT_MAN_PATH="$(mandir_SQ)"' $<
+ $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+ '-DGIT_MAN_PATH="$(mandir_SQ)"' \
+ '-DGIT_INFO_PATH="$(infodir_SQ)"' $<
git-merge-subtree$X: git-merge-recursive$X
$(QUIET_BUILT_IN)$(RM) $@ && ln git-merge-recursive$X $@
diff --git a/help.c b/help.c
index 9d7ad6f319..c96b1670f3 100644
--- a/help.c
+++ b/help.c
@@ -286,6 +286,7 @@ static void show_man_page(const char *git_cmd)
static void show_info_page(const char *git_cmd)
{
const char *page = cmd_to_page(git_cmd);
+ setenv("INFOPATH", GIT_INFO_PATH, 1);
execlp("info", "info", "gitman", page, NULL);
}