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>
Junio C Hamano committed
Feb 9, 2006 at 14:41 UTC
ce1610ead63221738225c415300f3d32620ced04
2 files changed
+3
-3
commit-tree.c
+2
-2
@@ -86,13 +86,13 @@ int main(int argc, char **argv)
86
unsigned int size;
87
88
setup_ident();
89
+ setup_git_directory();
90
+
91
git_config(git_default_config);
92
93
if (argc < 2 || get_sha1_hex(argv[1], tree_sha1) < 0)
94
usage(commit_tree_usage);
95
94
- setup_git_directory();
95
-
96
check_valid(tree_sha1, "tree");
97
for (i = 2; i < argc; i += 2) {
98
char *a, *b;
show-branch.c
+1
-1
@@ -548,8 +548,8 @@ int main(int ac, char **av)
548
int with_current_branch = 0;
549
int head_at = -1;
550
551
- git_config(git_show_branch_config);
551
setup_git_directory();
552
+ git_config(git_show_branch_config);
553
554
/* If nothing is specified, try the default first */
555
if (ac == 1 && default_num) {