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

[PATCH] builtin-archive: use RUN_SETUP

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 3, 2007, 16:14 UTC
Message-ID
<Pine.LNX.4.63.0703031714030.22628@wbgn013.biozentrum.uni-wuerzburg.de>
It used to roll its own setup.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
	It deletes more lines than it adds...
 builtin-archive.c |    2 --
 git.c             |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/builtin-archive.c b/builtin-archive.c
index 8ea6cb1..2fae885 100644
--- a/builtin-archive.c
+++ b/builtin-archive.c
@@ -252,8 +252,6 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
 
 	memset(&ar, 0, sizeof(ar));
 	tree_idx = parse_archive_args(argc, argv, &ar);
-	if (prefix == NULL)
-		prefix = setup_git_directory();
 
 	argv += tree_idx;
 	parse_treeish_arg(argv, &ar.args, prefix);
diff --git a/git.c b/git.c
index 909adf2..446d24e 100644
--- a/git.c
+++ b/git.c
@@ -237,7 +237,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
 		{ "add", cmd_add, RUN_SETUP | DISALLOW_IN_GIT_DIR },
 		{ "annotate", cmd_annotate, USE_PAGER },
 		{ "apply", cmd_apply },
-		{ "archive", cmd_archive },
+		{ "archive", cmd_archive, RUN_SETUP },
 		{ "blame", cmd_blame, RUN_SETUP },
 		{ "branch", cmd_branch, RUN_SETUP },
 		{ "bundle", cmd_bundle },
-- 
1.5.0.2.2498.g9e15a-dirty
Message 1 of 1 in “builtin-archive: use RUN_SETUP”
  1. builtin-archive: use RUN_SETUPJohannes Schindelin, Mar 3, 2007

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.