Merge branch 'jn/parse-options-extra'
* jn/parse-options-extra: update-index: migrate to parse-options API setup: save prefix (original cwd relative to toplevel) in startup_info parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION parse-options: allow git commands to invent new option types parse-options: never suppress arghelp if LITERAL_ARGHELP is set parse-options: do not infer PARSE_OPT_NOARG from option type parse-options: sanity check PARSE_OPT_NOARG flag parse-options: move NODASH sanity checks to parse_options_check parse-options: clearer reporting of API misuse parse-options: Don't call parse_options_check() so much
This commit is contained in:
4
setup.c
4
setup.c
@ -512,8 +512,10 @@ const char *setup_git_directory_gently(int *nongit_ok)
|
||||
const char *prefix;
|
||||
|
||||
prefix = setup_git_directory_gently_1(nongit_ok);
|
||||
if (startup_info)
|
||||
if (startup_info) {
|
||||
startup_info->have_repository = !nongit_ok || !*nongit_ok;
|
||||
startup_info->prefix = prefix;
|
||||
}
|
||||
return prefix;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user