cmd_archive() is registered without RUN_SETUP so its prefix will be NULL forever. Let's make that clear. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- builtin-archive.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin-archive.c b/builtin-archive.c index c2e0c1e..84405df 100644 --- a/builtin-archive.c +++ b/builtin-archive.c @@ -236,11 +236,12 @@ static const char *extract_remote_arg(int *ac, const char **av) return remote; } -int cmd_archive(int argc, const char **argv, const char *prefix) +int cmd_archive(int argc, const char **argv, const char *unused_prefix) { struct archiver ar; int tree_idx; const char *remote = NULL; + const char *prefix; remote = extract_remote_arg(&argc, argv); if (remote) @@ -250,9 +251,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(); + prefix = setup_git_directory(); argv += tree_idx; parse_treeish_arg(argv, &ar.args, prefix); parse_pathspec_arg(argv + 1, &ar.args); -- 1.5.4.2.281.g28d0e - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html