git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “Introducing git-run-with-user-path program.”
  1. 0/2 Introducing git-run-with-user-path program.Junio C Hamano, May 16, 2005
  2. 0/2 Introducing git-run-with-user-path program.Junio C Hamano, May 16, 2005
  3. Junio C HamanoMay 16, 2005
  4. Junio C HamanoMay 17, 2005
  5. 2/2 Add sample ignore logic to git-run-with-user-path command.Junio C Hamano, May 16, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.