From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eric Wong <normalperson@yhbt.net>, git@vger.kernel.org
Subject: Re: [PATCH 1/4] help: make 'git-help--browse' usable outside 'git-help'.
Date: Sun, 3 Feb 2008 06:00:29 +0100 [thread overview]
Message-ID: <200802030600.30074.chriscool@tuxfamily.org> (raw)
In-Reply-To: <7vmyqj4xxw.fsf@gitster.siamese.dyndns.org>
Le samedi 2 février 2008, Junio C Hamano a écrit :
> Christian Couder <chriscool@tuxfamily.org> writes:
> > + struct strbuf page_path; /* it leaks but we exec bellow */
> > +
> > + get_html_page_path(&page_path, page);
> > +
> > + execl_git_cmd("help--browse", page_path.buf, NULL);
> > }
>
> And this part makes the reviewer even more worried. If page
> could be NULL, then get_html_page_path() would be fed a NULL
> pointer, which is given to strbuf_addf()! Ugh.
>
> Then the reviewer would find out that cmd_to_page() would never
> return NULL, as it has its own NULL-to-"git" fallback logic.
>
> I think the code is good, but the proposed commit log message
> has some room for improvements.
Yeah, I could have explained some parts of the patch more.
I will try to do better.
> Something like...
>
> [PATCH 1/4] help: make 'git-help--browse' usable outside 'git-help'
>
> "git-help--browse" helper is to launch a browser of the
> user's choice to view the HTML version of git documentation
> for a given command. It used to take the name of a command,
> convert it to the path of the documentation by prefixing the
> directory name and appending the ".html" suffix, and start
> the browser on the path.
>
> This updates the division of labor between the caller in
> help.c and git-help--browser helper. The helper is now
> responsible for launching a browser of the user's choice
> on given URLs, and it is the caller's responsibility to
> tell it the paths to documentation files.
>
> This is in preparation to reuse the logic to choose
> user's preferred browser in instaweb.
>
> The helper had a provision for running it without any
> command name, in which case it showed the toplevel "git(7)"
> documentation, but the caller in help.c never makes such a
> call. The helper now exits with a usage message when no
> path is given.
Great commit message indeed! Though I fear that such long messages (for a
not very long patch) could take precious screen real estate when using "git
log" or otherwise bother some other readers.
Anyway do you want me to resend the patch or the series with improved commit
messages ?
> Signed-off-by: ...
> ---
>
> * Eric is CC'ed because the ultimate goal of this
> series is to get rid of the duplicated logic between
> help--browse and instaweb.
>
> Makefile | 2 +-
> git-help--browse.sh | 24 +++++++++---------------
> ...
>
> I have given only a cursory look at the remainder of the series
> (I'll hopefully be in a mini vacation mode after the release),
You definitely deserve it. Thanks for your great release and maintainer
work.
> but I think overall the series makes sense.
Thanks,
Christian.
prev parent reply other threads:[~2008-02-03 4:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 6:32 [PATCH 1/4] help: make 'git-help--browse' usable outside 'git-help' Christian Couder
2008-02-02 7:30 ` Junio C Hamano
2008-02-03 5:00 ` Christian Couder [this message]
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=200802030600.30074.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=normalperson@yhbt.net \
/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).