summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-12 21:49:53 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-12 21:49:53 -0800
commit6e67619d0cdc175557ca633dec391d4e795cf965 (patch)
tree4bf38f387e838a3ce2c08ab55e1f617c7d501f20 /setup.c
parent47bfb3d946288ec359bf98d06cc668a2ba12f3cb (diff)
parent309be813c9b75fed70f3a03bf803bf47c6670cfc (diff)
downloadgit-6e67619d0cdc175557ca633dec391d4e795cf965.tar.gz
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
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 346ef2eb2d..14f91e3935 100644
--- a/setup.c
+++ b/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;
}