From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Theodore Tso <tytso@mit.edu>,
Jakub Narebski <jnareb@gmail.com>,
Alex Riesen <raa.lkml@gmail.com>, Andreas Ericsson <ae@op5.se>,
Matthieu Moy <Matthieu.Moy@imag.fr>,
Eric Wong <normalperson@yhbt.net>
Subject: Re: [PATCH 2/3] git-help: add -w|--web option to display html man page in a browser.
Date: Fri, 7 Dec 2007 06:35:17 +0100 [thread overview]
Message-ID: <200712070635.18018.chriscool@tuxfamily.org> (raw)
In-Reply-To: <7v3aufeowe.fsf@gitster.siamese.dyndns.org>
Le jeudi 6 décembre 2007, Junio C Hamano a écrit :
> Christian Couder <chriscool@tuxfamily.org> writes:
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index d886641..3e01718 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -29,6 +29,7 @@ DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
> >
> > prefix?=$(HOME)
> > bindir?=$(prefix)/bin
> > +htmldir?=$(prefix)/share/doc/git-doc
> > mandir?=$(prefix)/share/man
> > man1dir=$(mandir)/man1
> > man5dir=$(mandir)/man5
>
> Doing this and then ...
>
> > diff --git a/Makefile b/Makefile
> > index a5a40ce..9204bfe 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -807,6 +808,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
> > -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
> > -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
> > -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
> > + -e 's|@@PREFIX@@|$(prefix_SQ)|g' \
> > $@.sh >$@+ && \
> > chmod +x $@+ && \
> > mv $@+ $@
> > ...
> > diff --git a/git-browse-help.sh b/git-browse-help.sh
> > new file mode 100755
> > index 0000000..11f8bfa
> > --- /dev/null
> > +++ b/git-browse-help.sh
> > @@ -0,0 +1,154 @@
> > +#!/bin/sh
> > ...
> > +USAGE='[--browser=browser|--tool=browser] [cmd to display] ...'
> > +SUBDIRECTORY_OK=Yes
> > +OPTIONS_SPEC=
> > +. git-sh-setup
> > +
> > +PREFIX="@@PREFIX@@"
> > +GIT_VERSION="@@GIT_VERSION@@"
> > +
> > +# Directories that may contain html documentation:
> > +install_html_dir="$PREFIX/share/doc/git-doc"
> > +rpm_dir="$PREFIX/share/doc/git-core-$GIT_VERSION"
>
> ... doing this is wrong. People can set htmldir to somewhere other than
> $(prefix)/share/doc/git-doc while building and installing, but you are
> not telling the munged script where it is.
Yeah, I sent a fix for this.
> > +init_browser_path() {
> > + browser_path=`git config browser.$1.path`
> > + test -z "$browser_path" && browser_path=$1
> > +}
>
> Please do not contaminate the config file with something the user can
> easily use a lot more standardized way (iow $PATH) to configure to his
> taste.
>
> I'd suggest dropping this bit.
I stole this part from "git-mergetool.sh":
init_merge_tool_path() {
merge_tool_path=`git config mergetool.$1.path`
if test -z "$merge_tool_path" ; then
case "$1" in
emerge)
merge_tool_path=emacs
;;
*)
merge_tool_path=$1
;;
esac
fi
}
So we should either drop it in "git-mergetool.sh" too or keep it in both
scripts.
Thanks,
Christian.
next prev parent reply other threads:[~2007-12-07 5:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-02 5:07 [PATCH 2/3] git-help: add -w|--web option to display html man page in a browser Christian Couder
2007-12-06 17:03 ` Junio C Hamano
2007-12-07 5:35 ` Christian Couder [this message]
2007-12-07 6:04 ` Junio C Hamano
2007-12-07 7:05 ` Junio C Hamano
2007-12-08 4:00 ` Christian Couder
2007-12-06 17:05 ` Junio C Hamano
2007-12-08 8:28 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200712070635.18018.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=Matthieu.Moy@imag.fr \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=normalperson@yhbt.net \
--cc=raa.lkml@gmail.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).