Merge branch 'lt/abbrev-auto'

Allow the default abbreviation length, which has historically been
7, to scale as the repository grows.  The logic suggests to use 12
hexdigits for the Linux kernel, and 9 to 10 for Git itself.

* lt/abbrev-auto:
  abbrev: auto size the default abbreviation
  abbrev: prepare for new world order
  abbrev: add FALLBACK_DEFAULT_ABBREV to prepare for auto sizing
This commit is contained in:
Junio C Hamano
2016-10-27 14:58:47 -07:00
7 changed files with 40 additions and 7 deletions

2
diff.c
View File

@ -3468,7 +3468,7 @@ void diff_setup_done(struct diff_options *options)
*/
read_cache();
}
if (options->abbrev <= 0 || 40 < options->abbrev)
if (40 < options->abbrev)
options->abbrev = 40; /* full */
/*