aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-08-16 10:36:12 +1000
committerJunio C Hamano <gitster@pobox.com>2010-08-15 19:56:10 -0700
commitd1ea896290629185dc0bf4efa3469b410bd41313 (patch)
treeec3be47a2afe45ac6c845c22d71fd63c2b13fd91 /builtin
parentff38d1a9953b3bce7741f8f962c5e067fda2d9ea (diff)
downloadgit-d1ea896290629185dc0bf4efa3469b410bd41313.tar.gz
git-d1ea896290629185dc0bf4efa3469b410bd41313.tar.xz
apply: run setup_git_directory_gently() sooner
As v1.7.2~16^2 (2010-07-14) explains, without this change, “git --paginate apply” can ignore the repository-local “[core] pager” configuration. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 12ef9ea8a..f005ba1e8 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -3607,11 +3607,11 @@ static int option_parse_directory(const struct option *opt,
return 0;
}
-int cmd_apply(int argc, const char **argv, const char *unused_prefix)
+int cmd_apply(int argc, const char **argv, const char *prefix_)
{
int i;
int errs = 0;
- int is_not_gitdir;
+ int is_not_gitdir = !startup_info->have_repository;
int binary;
int force_apply = 0;
@@ -3684,7 +3684,7 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
OPT_END()
};
- prefix = setup_git_directory_gently(&is_not_gitdir);
+ prefix = prefix_;
prefix_length = prefix ? strlen(prefix) : 0;
git_config(git_apply_config, NULL);
if (apply_default_whitespace)