mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
builtin-archive: use RUN_SETUP
It used to roll its own setup. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
81035bba0a
commit
64edf4b2eb
@ -252,8 +252,6 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
|
|||||||
|
|
||||||
memset(&ar, 0, sizeof(ar));
|
memset(&ar, 0, sizeof(ar));
|
||||||
tree_idx = parse_archive_args(argc, argv, &ar);
|
tree_idx = parse_archive_args(argc, argv, &ar);
|
||||||
if (prefix == NULL)
|
|
||||||
prefix = setup_git_directory();
|
|
||||||
|
|
||||||
argv += tree_idx;
|
argv += tree_idx;
|
||||||
parse_treeish_arg(argv, &ar.args, prefix);
|
parse_treeish_arg(argv, &ar.args, prefix);
|
||||||
|
2
git.c
2
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 },
|
{ "add", cmd_add, RUN_SETUP | NOT_BARE },
|
||||||
{ "annotate", cmd_annotate, USE_PAGER },
|
{ "annotate", cmd_annotate, USE_PAGER },
|
||||||
{ "apply", cmd_apply },
|
{ "apply", cmd_apply },
|
||||||
{ "archive", cmd_archive },
|
{ "archive", cmd_archive, RUN_SETUP },
|
||||||
{ "blame", cmd_blame, RUN_SETUP },
|
{ "blame", cmd_blame, RUN_SETUP },
|
||||||
{ "branch", cmd_branch, RUN_SETUP },
|
{ "branch", cmd_branch, RUN_SETUP },
|
||||||
{ "cat-file", cmd_cat_file, RUN_SETUP },
|
{ "cat-file", cmd_cat_file, RUN_SETUP },
|
||||||
|
Loading…
Reference in New Issue
Block a user