From: Johannes Schindelin Date: Sat, 3 Mar 2007 16:14:25 +0000 (+0100) Subject: builtin-archive: use RUN_SETUP X-Git-Tag: v1.5.0.3~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=64edf4b2eb19e5b94eda60c0e21d85e45602a8f1;p=git.git builtin-archive: use RUN_SETUP It used to roll its own setup. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/builtin-archive.c b/builtin-archive.c index f613ac251..5265764b6 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 45265f14d..660b0a6dc 100644 --- a/git.c +++ b/git.c @@ -226,7 +226,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp) { "add", cmd_add, RUN_SETUP | NOT_BARE }, { "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 }, { "cat-file", cmd_cat_file, RUN_SETUP },