git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: pasky@ucw.cz
Cc: torvalds@osdl.org, git@vger.kernel.org
Subject: Re: [PATCH 1/2] Introduce git-run-with-user-path helper program.
Date: Mon, 16 May 2005 21:15:06 -0700	[thread overview]
Message-ID: <7vacmulc8l.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7v3bsmn3ia.fsf_-_@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon, 16 May 2005 16:40:45 -0700")

*Blush*.  I sent out a bad copy for this patch.

In run-with-user-path.c, in main():

+	/* We need to special case -- (end of command) followed
+	 * immediately by -- (beginning of paths); otherwise
+	 * "git-run-with-user-path git-update-cache --add -- -- foo"
+	 * would try canonicalize and filter path arguments starting
+	 * from -- (beginning of paths), which is not what we want.
+	 */
+	if (!strcmp(av[command_end + 1], "--")) {
+		exec_param[command_end-1] = av[command_end + 1];
+		command_end++;
+	}

The above if() statement should be:

    if (command_end + 1 < ac && !strcmp(av[command_end + 1], "--")) {

Otherwise "./git-run-with-user-path echo --" would segfault.
Sorry about the noise.



  reply	other threads:[~2005-05-17  4:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16  6:04 [PATCH 0/2] Introducing git-run-with-user-path program Junio C Hamano
2005-05-16 23:21 ` Junio C Hamano
2005-05-16 23:40   ` [PATCH 1/2] Introduce git-run-with-user-path helper program Junio C Hamano
2005-05-17  4:15     ` Junio C Hamano [this message]
2005-05-16 23:41   ` [PATCH 2/2] Add sample ignore logic to git-run-with-user-path command Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2005-05-16  6:05 [PATCH 1/2] Introduce git-run-with-user-path helper program Junio C Hamano
2005-05-17 19:03 ` Petr Baudis
2005-05-17 19:27   ` Junio C Hamano
2005-05-17 20:35     ` Petr Baudis
2005-05-17 21:18       ` Junio C Hamano
2005-05-17 21:37         ` Petr Baudis
2005-05-17 22:13           ` Junio C Hamano
2005-05-18 21:33             ` Petr Baudis
2005-05-18 22:41               ` Junio C Hamano
2005-05-18 23:24                 ` Petr Baudis
2005-05-18 23:56                   ` Junio C Hamano
2005-05-19  0:34                     ` Linus Torvalds
2005-05-19 20:35                       ` Junio C Hamano
2005-05-19  7:40                   ` Thomas Glanzmann
2005-05-19  8:23                     ` 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=7vacmulc8l.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=pasky@ucw.cz \
    --cc=torvalds@osdl.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 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).