Skip to content

Commit

Permalink
call git_config() after setup_git_directory()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Feb 9, 2006
1 parent 147cf31 commit ce1610e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions commit-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion show-branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ce1610e

Please sign in to comment.