Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
call git_config() after setup_git_directory()
author
Junio C Hamano
<junkio@cox.net>
Thu, 9 Feb 2006 22:41:39 +0000
(14:41 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 9 Feb 2006 22:41:39 +0000
(14:41 -0800)
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>
commit-tree.c
patch
|
blob
|
history
show-branch.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
147cf31
)
diff --git
a/commit-tree.c
b/commit-tree.c
index 4634b50e6aa8bb214da7ebf41d2a8cf34028f531..b1c8dca48d803d06c3340df32fcaa57c291ce32d 100644
(file)
--- a/
commit-tree.c
+++ b/
commit-tree.c
@@
-86,13
+86,13
@@
int main(int argc, char **argv)
unsigned int size;
setup_ident();
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);
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;
check_valid(tree_sha1, "tree");
for (i = 2; i < argc; i += 2) {
char *a, *b;
diff --git
a/show-branch.c
b/show-branch.c
index ffe7456a6a8b44276a8779cabf16e4613b268ec0..511fd3b656ec0f66492994c21bb024a52f482a78 100644
(file)
--- a/
show-branch.c
+++ b/
show-branch.c
@@
-548,8
+548,8
@@
int main(int ac, char **av)
int with_current_branch = 0;
int head_at = -1;
int with_current_branch = 0;
int head_at = -1;
- git_config(git_show_branch_config);
setup_git_directory();
setup_git_directory();
+ git_config(git_show_branch_config);
/* If nothing is specified, try the default first */
if (ac == 1 && default_num) {
/* If nothing is specified, try the default first */
if (ac == 1 && default_num) {