diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-02-18 13:53:30 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-02-18 13:53:30 -0800 |
| commit | c5973cb98ff4fe0779e90e04de7c099cc2256a3a (patch) | |
| tree | d09aedb1405c3b20e31b81c982edf697e4036fbc /builtin/pull.c | |
| parent | Merge branch 'tb/midx-no-bitmap-for-no-objects' (diff) | |
| parent | t0012: verify that built-ins handle `-h` even without gitdir (diff) | |
| download | git-c5973cb98ff4fe0779e90e04de7c099cc2256a3a.tar.gz git-c5973cb98ff4fe0779e90e04de7c099cc2256a3a.zip | |
Merge branch 'js/short-help-outside-repo-fix'
"git cmd -h" outside a repository should error out cleanly for many
commands, but instead it hit a BUG(), which has been corrected.
* js/short-help-outside-repo-fix:
t0012: verify that built-ins handle `-h` even without gitdir
checkout/fetch/pull/pack-objects: allow `-h` outside a repository
Diffstat (limited to 'builtin/pull.c')
| -rw-r--r-- | builtin/pull.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 8f37880a48..3768552e68 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -994,8 +994,10 @@ int cmd_pull(int argc, const char **argv, const char *prefix) set_reflog_message(argc, argv); git_config(git_pull_config, NULL); - prepare_repo_settings(the_repository); - the_repository->settings.command_requires_full_index = 0; + if (the_repository->gitdir) { + prepare_repo_settings(the_repository); + the_repository->settings.command_requires_full_index = 0; + } argc = parse_options(argc, argv, prefix, pull_options, pull_usage, 0); |
