git-help -i: show info documentation from matching version of git
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Dec 10, 2007 at 01:35 UTC
a149a1a44af45352b63e2dadd790616966c220be
2 files changed
+6
-1
Makefile
+5
-1
@@ -155,6 +155,7 @@ STRIP ?= strip
155
prefix = $(HOME)
156
bindir = $(prefix)/bin
157
mandir = $(prefix)/share/man
158
+infodir = $(prefix)/share/info
159
gitexecdir = $(bindir)
160
sharedir = $(prefix)/share
161
template_dir = $(sharedir)/git-core/templates
@@ -750,6 +751,7 @@ ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG))
751
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
752
bindir_SQ = $(subst ','\'',$(bindir))
753
mandir_SQ = $(subst ','\'',$(mandir))
754
+infodir_SQ = $(subst ','\'',$(infodir))
755
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
756
template_dir_SQ = $(subst ','\'',$(template_dir))
757
htmldir_SQ = $(subst ','\'',$(htmldir))
@@ -798,7 +800,9 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
800
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
801
802
help.o: help.c common-cmds.h GIT-CFLAGS
801
- $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) '-DGIT_MAN_PATH="$(mandir_SQ)"' $<
803
+ $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
804
+ '-DGIT_MAN_PATH="$(mandir_SQ)"' \
805
+ '-DGIT_INFO_PATH="$(infodir_SQ)"' $<
806
807
git-merge-subtree$X: git-merge-recursive$X
808
$(QUIET_BUILT_IN)$(RM) $@ && ln git-merge-recursive$X $@
help.c
+1
@@ -286,6 +286,7 @@ static void show_man_page(const char *git_cmd)
286
static void show_info_page(const char *git_cmd)
287
{
288
const char *page = cmd_to_page(git_cmd);
289
+ setenv("INFOPATH", GIT_INFO_PATH, 1);
290
execlp("info", "info", "gitman", page, NULL);
291
}
292