diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:23:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:23:31 -0700 |
commit | 633142d86874ee8ce79a23ee4346f32e6271faad (patch) | |
tree | 8096e26f84075d3aae42d13fe0b76c2a5f2ea07c /builtin/apply.c | |
parent | 693fefe3d022767975eec7585561bfe178b873f4 (diff) | |
parent | 41bf3bc232cf5f99fdc6d3d729536a4c4821d3bd (diff) | |
download | git-633142d86874ee8ce79a23ee4346f32e6271faad.tar.gz |
Merge branch 'jn/paginate-fix'
* jn/paginate-fix:
t7006 (pager): add missing TTY prerequisites
merge-file: run setup_git_directory_gently() sooner
var: run setup_git_directory_gently() sooner
ls-remote: run setup_git_directory_gently() sooner
index-pack: run setup_git_directory_gently() sooner
config: run setup_git_directory_gently() sooner
bundle: run setup_git_directory_gently() sooner
apply: run setup_git_directory_gently() sooner
grep: run setup_git_directory_gently() sooner
shortlog: run setup_git_directory_gently() sooner
git wrapper: allow setup_git_directory_gently() be called earlier
setup: remember whether repository was found
git wrapper: introduce startup_info struct
Conflicts:
builtin/index-pack.c
Diffstat (limited to 'builtin/apply.c')
-rw-r--r-- | builtin/apply.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/apply.c b/builtin/apply.c index f38c1f7b88..470520bde7 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -3606,11 +3606,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; @@ -3683,7 +3683,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) |