Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/2] Introduce git-run-with-user-path helper program.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:57

*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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help