summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 07f9247)
raw | patch | inline | side by side (parent: 07f9247)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 22 Nov 2005 06:52:37 +0000 (22:52 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 22 Nov 2005 07:00:50 +0000 (23:00 -0800) |
Otherwise we would end up linking all the unneeded stuff into git-daemon
only to link with git_default_config.
Signed-off-by: Junio C Hamano <junkio@cox.net>
only to link with git_default_config.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
config.c | patch | blob | history | |
diff-files.c | patch | blob | history | |
diff-index.c | patch | blob | history | |
diff-stages.c | patch | blob | history | |
diff-tree.c | patch | blob | history | |
diff.c | patch | blob | history | |
diff.h | patch | blob | history |
diff --git a/Makefile b/Makefile
index ecbb88889dbcb52437451b0258c4a643a238ce2e..a97a5d95956049545a5b36e7fea93e90b1f7e33d 100644 (file)
--- a/Makefile
+++ b/Makefile
### Cleaning rules
clean:
- rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o git $(PROGRAMS) $(LIB_FILE)
+ rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o $(LIB_FILE)
+ rm -f $(PROGRAMS) $(SIMPLE_PROGRAMS) git$X
rm -f $(filter-out gitk,$(SCRIPTS))
rm -f *.spec *.pyc *.pyo
rm -rf $(GIT_TARNAME)
diff --git a/config.c b/config.c
index 357c1caf973dbe5fd039baff45b244266725188e..18d59ee6e3295d66c091e32a0cef15327c94c36a 100644 (file)
--- a/config.c
+++ b/config.c
return 0;
}
- if (!strcmp(var, "diff.renamelimit")) {
- diff_rename_limit_default = git_config_int(var, value);
- return 0;
- }
-
/* Add other config variables here.. */
return 0;
}
diff --git a/diff-files.c b/diff-files.c
index 17899390b80f4bfc03718e92029b5c4de65055b6..38599b5b755df431e3e061df8a304698cc4496fc 100644 (file)
--- a/diff-files.c
+++ b/diff-files.c
const char *prefix = setup_git_directory();
int entries, i;
- git_config(git_default_config);
+ git_config(git_diff_config);
diff_setup(&diff_options);
while (1 < argc && argv[1][0] == '-') {
if (!strcmp(argv[1], "--")) {
diff --git a/diff-index.c b/diff-index.c
index c9a9f4c74d96ea22b2a6c4c7593bccc3d5396457..0054883a5e18aaacc682bb8369c6f0376cf75306 100644 (file)
--- a/diff-index.c
+++ b/diff-index.c
int allow_options = 1;
int i;
- git_config(git_default_config);
+ git_config(git_diff_config);
diff_setup(&diff_options);
for (i = 1; i < argc; i++) {
const char *arg = argv[i];
diff --git a/diff-stages.c b/diff-stages.c
index 85170b21d632dbb490b28ad426069ce4e1011bc1..9968d6ce1c4b361962900040afdfe431e39deb61 100644 (file)
--- a/diff-stages.c
+++ b/diff-stages.c
{
int stage1, stage2;
+ setup_git_directory();
+
+ git_config(git_diff_config);
read_cache();
diff_setup(&diff_options);
while (1 < ac && av[1][0] == '-') {
diff --git a/diff-tree.c b/diff-tree.c
index 09d16ad6619d7e95959adf2003a8d0f8626491ce..da9c68c16f721eabbd80db1ec7483f92a2854e29 100644 (file)
--- a/diff-tree.c
+++ b/diff-tree.c
unsigned char sha1[2][20];
const char *prefix = setup_git_directory();
- git_config(git_default_config);
+ git_config(git_diff_config);
nr_sha1 = 0;
diff_setup(&diff_options);
index ffe8a5523406badc415b11f468a2aafb7c9611a9..2e0797bf3ee651a644be50aee10ee125fe96368f 100644 (file)
--- a/diff.c
+++ b/diff.c
int diff_rename_limit_default = -1;
+int git_diff_config(const char *var, const char *value)
+{
+ if (!strcmp(var, "diff.renamelimit")) {
+ diff_rename_limit_default = git_config_int(var, value);
+ return 0;
+ }
+
+ return git_default_config(var, value);
+}
+
static char *quote_one(const char *str)
{
int needlen;
index 9b2e1e62bbe6f621d2d39ec7707eccd75ff76aac..32b4780173d78bfd0e77a37f82df4a59aa502ec1 100644 (file)
--- a/diff.h
+++ b/diff.h
#define DIFF_SETUP_USE_CACHE 2
#define DIFF_SETUP_USE_SIZE_CACHE 4
+extern int git_diff_config(const char *var, const char *value);
extern void diff_setup(struct diff_options *);
extern int diff_opt_parse(struct diff_options *, const char **, int);
extern int diff_setup_done(struct diff_options *);