Re: [PATCH 1/2] Introduce git-run-with-user-path helper program.
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 17, 2005, 04:15 UTC
- Message-ID
- <7vacmulc8l.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7v3bsmn3ia.fsf_-_@assigned-by-dhcp.cox.net>
*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.