From 265d528032e55c48798266c538d3e6338cb1e2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Thu, 5 Apr 2007 22:55:43 +0200 Subject: Revert "builtin-archive: use RUN_SETUP" Commit 64edf4b2 cleaned up the initialization of git-archive, at the cost of 'git-archive --list' now requiring a git repo. This patch reverts the cleanup and documents the requirement for this particular dirtyness in a test. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin-archive.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin-archive.c') diff --git a/builtin-archive.c b/builtin-archive.c index 2fae885f5c..8ea6cb1efc 100644 --- a/builtin-archive.c +++ b/builtin-archive.c @@ -252,6 +252,8 @@ 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); -- cgit v1.2.3