From eb0224c617ba6b4299f2a9f85d6c4b3b5e10abc0 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 22 Nov 2016 13:37:04 -0800 Subject: archive: read local configuration Since b9605bc4f2 ("config: only read .git/config from configured repos", 2016-09-12), we do not read from ".git/config" unless we know we are in a repository. "git archive" however didn't do the repository discovery and instead relied on the old behaviour. Teach the command to run a "gentle" version of repository discovery so that local configuration variables are honoured. [jc: stole tests from peff] Signed-off-by: Junio C Hamano --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git.c') diff --git a/git.c b/git.c index fd3abf85d2..e8b2baf2d1 100644 --- a/git.c +++ b/git.c @@ -396,7 +396,7 @@ static struct cmd_struct commands[] = { { "am", cmd_am, RUN_SETUP | NEED_WORK_TREE }, { "annotate", cmd_annotate, RUN_SETUP }, { "apply", cmd_apply, RUN_SETUP_GENTLY }, - { "archive", cmd_archive }, + { "archive", cmd_archive, RUN_SETUP_GENTLY }, { "bisect--helper", cmd_bisect__helper, RUN_SETUP }, { "blame", cmd_blame, RUN_SETUP }, { "branch", cmd_branch, RUN_SETUP }, -- cgit v1.2.3