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

[PATCH 3/3] git-tar-tree.c: no need to be in a git repo when using --remote

From
FBFranck Bui-Huu <vagabon.xyz@gmail.com>
Date
Aug 31, 2006, 12:35 UTC
Message-ID
<11570277232555-git-send-email-vagabon.xyz@gmail.com>
In-Reply-To
<11570277231100-git-send-email-vagabon.xyz@gmail.com>
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
---
 builtin-tar-tree.c |    2 ++
 git.c              |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index 61a4135..ad1a8a6 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -390,6 +390,8 @@ int cmd_tar_tree(int argc, const char **
 		usage(tar_tree_usage);
 	if (!strncmp("--remote=", argv[1], 9))
 		return remote_tar(argc, argv);
+	if (prefix == NULL)
+		prefix = setup_git_directory();
 	return generate_tar(argc, argv, prefix);
 }
 
diff --git a/git.c b/git.c
index bd07289..c323d30 100644
--- a/git.c
+++ b/git.c
@@ -262,7 +262,7 @@ static void handle_internal_command(int 
 		{ "show", cmd_show, RUN_SETUP | USE_PAGER },
 		{ "stripspace", cmd_stripspace },
 		{ "symbolic-ref", cmd_symbolic_ref, RUN_SETUP },
-		{ "tar-tree", cmd_tar_tree, RUN_SETUP },
+		{ "tar-tree", cmd_tar_tree },
 		{ "zip-tree", cmd_zip_tree, RUN_SETUP },
 		{ "unpack-objects", cmd_unpack_objects, RUN_SETUP },
 		{ "update-index", cmd_update_index, RUN_SETUP },
-- 
1.4.2
Previous: Franck Bui-HuuNext: Rene Scharfe
Message 6 of 11 in “git-daemon: plug new upload-tar command”
  1. 0/3 git-daemon: plug new upload-tar commandFranck Bui-Huu, Aug 31, 2006
  2. 1/3 daemon.c: introduce daemon's serviceFranck Bui-Huu, Aug 31, 2006
  3. Franck Bui-HuuAug 31, 2006
  4. 1/3 daemon.c: introduce daemon's service [take #2]Franck Bui-Huu, Aug 31, 2006
  5. 2/3 daemon.c: added upload-tar serviceFranck Bui-Huu, Aug 31, 2006
  6. 3/3 git-tar-tree.c: no need to be in a git repo when using --remoteFranck Bui-Huu, Aug 31, 2006
  7. Rene ScharfeAug 31, 2006
  8. Franck Bui-HuuSep 2, 2006
  9. Junio C HamanoSep 2, 2006
  10. Jakub NarebskiSep 2, 2006
  11. Franck Bui-HuuSep 2, 2006

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.