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

[PATCH] Remove shell dependency in env.c

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Sep 15, 2005, 05:50 UTC
Message-ID
<43290BB8.90501@zytor.com>

This patch adds an invocation of "env", so rsh.c works for C-shell users as well as Bourne shell users.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Explicitly invoke "env" so it doesn't depend on a specific shell.

--- commit 642840f61656059dc3929e7c3af9db7f6e251fa3 tree d8d77e8643efd7c70b834e02382bb694252b8b2d parent 19397b4521bcc27eb224413fb71519223b94290f author H. Peter Anvin <hpa@smyrno.hos.anvin.org> Wed, 14 Sep 2005 22:24:37 -0700 committer H. Peter Anvin <hpa@smyrno.hos.anvin.org> Wed, 14 Sep 2005 22:24:37 -0700

 rsh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/rsh.c b/rsh.c
--- a/rsh.c
+++ b/rsh.c
@@ -39,7 +39,7 @@ int setup_connection(int *fd_in, int *fd
 	}
 	/* ssh <host> 'cd <path>; stdio-pull <arg...> <commit-id>' */
 	snprintf(command, COMMAND_SIZE, 
-		 "%s='%s' %s",
+		 "env %s='%s' %s",
 		 GIT_DIR_ENVIRONMENT, path, remote_prog);
 	*path = '\0';
 	posn = command + strlen(command);
Next: Junio C Hamano
Message 1 of 12 in “Remove shell dependency in env.c”
  1. Remove shell dependency in env.cH. Peter Anvin, Sep 15, 2005
  2. Junio C HamanoSep 15, 2005
  3. H. Peter AnvinSep 15, 2005
  4. Shell quotingH. Peter Anvin, Sep 15, 2005
  5. Linus TorvaldsSep 15, 2005
  6. H. Peter AnvinSep 15, 2005
  7. Junio C HamanoSep 15, 2005
  8. H. Peter AnvinSep 15, 2005
  9. Junio C HamanoSep 15, 2005
  10. Linus TorvaldsSep 15, 2005
  11. Junio C HamanoSep 16, 2005
  12. rsh.c env and quoting cleanup, take 2H. Peter Anvin, Sep 15, 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.