From: "H. Peter Anvin" <hpa@zytor.com>
To: Andreas Ericsson <exon@op5.se>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] git --help COMMAND brings up the git-COMMAND man-page., take two
Date: Tue, 15 Nov 2005 19:45:12 -0800 [thread overview]
Message-ID: <437AAB48.7090904@zytor.com> (raw)
In-Reply-To: <20051116002318.A46C55BF97@nox.op5.se>
Andreas Ericsson wrote:
>
> +static void show_man_page(char *git_cmd)
> +{
> + char *page;
> +
> + if (!strncmp(git_cmd, "git", 3))
> + page = git_cmd;
> + else {
> + int page_len = strlen(git_cmd) + 4;
> +
> + page = malloc(page_len + 1);
> + strcpy(page, "git-");
> + strcpy(page + 4, git_cmd);
> + page[page_len] = 0;
> + }
> +
> + execlp("man", "man", page, NULL);
> +}
> +
The way this made it into the actual tree was to call /usr/bin/man, but
still using execlp(). This is clearly bogus. There *ARE* good reasons
to use PATH resolutions for this, since man is one of the interactive
commands the user may want to wrapper.
So please drop PATH_TO_MAN that made it into the repository and revert
to the original patch.
-hpa
next prev parent reply other threads:[~2005-11-16 3:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 0:23 [PATCH 3/3] git --help COMMAND brings up the git-COMMAND man-page., take two Andreas Ericsson
2005-11-16 3:45 ` H. Peter Anvin [this message]
2005-11-16 6:56 ` Andreas Ericsson
2005-11-16 7:17 ` [PATCH] git wrapper: basic fixes Junio C Hamano
2005-11-16 8:22 ` Johannes Schindelin
2005-11-16 7:29 ` [PATCH 3/3] git --help COMMAND brings up the git-COMMAND man-page., take two Junio C Hamano
2005-11-16 21:53 ` H. Peter Anvin
2005-11-16 23:16 ` Andreas Ericsson
2005-11-16 23:17 ` H. Peter Anvin
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=437AAB48.7090904@zytor.com \
--to=hpa@zytor.com \
--cc=exon@op5.se \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.