зеркало из https://github.com/microsoft/git.git
call git_config() after setup_git_directory()
If you call setup_git_directory() to work from a subdirectory, that should be run first before running git_config(). Otherwise you would not read the configuration file from the correct place. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
147cf31738
Коммит
ce1610ead6
|
@ -86,13 +86,13 @@ int main(int argc, char **argv)
|
|||
unsigned int size;
|
||||
|
||||
setup_ident();
|
||||
setup_git_directory();
|
||||
|
||||
git_config(git_default_config);
|
||||
|
||||
if (argc < 2 || get_sha1_hex(argv[1], tree_sha1) < 0)
|
||||
usage(commit_tree_usage);
|
||||
|
||||
setup_git_directory();
|
||||
|
||||
check_valid(tree_sha1, "tree");
|
||||
for (i = 2; i < argc; i += 2) {
|
||||
char *a, *b;
|
||||
|
|
|
@ -548,8 +548,8 @@ int main(int ac, char **av)
|
|||
int with_current_branch = 0;
|
||||
int head_at = -1;
|
||||
|
||||
git_config(git_show_branch_config);
|
||||
setup_git_directory();
|
||||
git_config(git_show_branch_config);
|
||||
|
||||
/* If nothing is specified, try the default first */
|
||||
if (ac == 1 && default_num) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче