mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
Move diff.renamelimit out of default configuration.
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>
This commit is contained in:
parent
07f9247722
commit
9ce392f482
3
Makefile
3
Makefile
|
@ -482,7 +482,8 @@ deb: dist
|
||||||
### Cleaning rules
|
### Cleaning rules
|
||||||
|
|
||||||
clean:
|
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 $(filter-out gitk,$(SCRIPTS))
|
||||||
rm -f *.spec *.pyc *.pyo
|
rm -f *.spec *.pyc *.pyo
|
||||||
rm -rf $(GIT_TARNAME)
|
rm -rf $(GIT_TARNAME)
|
||||||
|
|
5
config.c
5
config.c
|
@ -236,11 +236,6 @@ int git_default_config(const char *var, const char *value)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(var, "diff.renamelimit")) {
|
|
||||||
diff_rename_limit_default = git_config_int(var, value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add other config variables here.. */
|
/* Add other config variables here.. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ int main(int argc, const char **argv)
|
||||||
const char *prefix = setup_git_directory();
|
const char *prefix = setup_git_directory();
|
||||||
int entries, i;
|
int entries, i;
|
||||||
|
|
||||||
git_config(git_default_config);
|
git_config(git_diff_config);
|
||||||
diff_setup(&diff_options);
|
diff_setup(&diff_options);
|
||||||
while (1 < argc && argv[1][0] == '-') {
|
while (1 < argc && argv[1][0] == '-') {
|
||||||
if (!strcmp(argv[1], "--")) {
|
if (!strcmp(argv[1], "--")) {
|
||||||
|
|
|
@ -180,7 +180,7 @@ int main(int argc, const char **argv)
|
||||||
int allow_options = 1;
|
int allow_options = 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
git_config(git_default_config);
|
git_config(git_diff_config);
|
||||||
diff_setup(&diff_options);
|
diff_setup(&diff_options);
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
const char *arg = argv[i];
|
const char *arg = argv[i];
|
||||||
|
|
|
@ -55,6 +55,9 @@ int main(int ac, const char **av)
|
||||||
{
|
{
|
||||||
int stage1, stage2;
|
int stage1, stage2;
|
||||||
|
|
||||||
|
setup_git_directory();
|
||||||
|
|
||||||
|
git_config(git_diff_config);
|
||||||
read_cache();
|
read_cache();
|
||||||
diff_setup(&diff_options);
|
diff_setup(&diff_options);
|
||||||
while (1 < ac && av[1][0] == '-') {
|
while (1 < ac && av[1][0] == '-') {
|
||||||
|
|
|
@ -164,7 +164,7 @@ int main(int argc, const char **argv)
|
||||||
unsigned char sha1[2][20];
|
unsigned char sha1[2][20];
|
||||||
const char *prefix = setup_git_directory();
|
const char *prefix = setup_git_directory();
|
||||||
|
|
||||||
git_config(git_default_config);
|
git_config(git_diff_config);
|
||||||
nr_sha1 = 0;
|
nr_sha1 = 0;
|
||||||
diff_setup(&diff_options);
|
diff_setup(&diff_options);
|
||||||
|
|
||||||
|
|
10
diff.c
10
diff.c
|
@ -15,6 +15,16 @@ static int use_size_cache;
|
||||||
|
|
||||||
int diff_rename_limit_default = -1;
|
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)
|
static char *quote_one(const char *str)
|
||||||
{
|
{
|
||||||
int needlen;
|
int needlen;
|
||||||
|
|
1
diff.h
1
diff.h
|
@ -77,6 +77,7 @@ extern int diff_scoreopt_parse(const char *opt);
|
||||||
#define DIFF_SETUP_USE_CACHE 2
|
#define DIFF_SETUP_USE_CACHE 2
|
||||||
#define DIFF_SETUP_USE_SIZE_CACHE 4
|
#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 void diff_setup(struct diff_options *);
|
||||||
extern int diff_opt_parse(struct diff_options *, const char **, int);
|
extern int diff_opt_parse(struct diff_options *, const char **, int);
|
||||||
extern int diff_setup_done(struct diff_options *);
|
extern int diff_setup_done(struct diff_options *);
|
||||||
|
|
Loading…
Reference in a new issue