jgit/org.eclipse.jgit
Matthias Sohn 6f175ea6c4 Describe: add support for core.abbrev config option
If core.abbrev is unset or "auto" estimate abbreviation length like C
git does:
- Estimate repository's object count by only considering packed objects,
  round up to next power of 2
- With the order of 2^len objects, we expect a collision at 2^(len/2).
  But we also care about hex chars, not bits, and there are 4 bits per
  hex. So all together we need to divide by 2; but we also want to round
  odd numbers up, hence adding one before dividing.
- For small repos use at least 7 hexdigits
- If object database fails to determine object count use 7 hexdigits as
  fallback

If it is set to "no" do not abbreviate object-ids.

Otherwise set it to the configured value capped to the range between 4
and length of an unabbreviated object-id.

Change-Id: I425f9724b69813dbb57872466bf2d2e1d6dc72c6
2022-03-02 19:29:48 +01:00
..
.settings Describe: add support for core.abbrev config option 2022-03-02 19:29:48 +01:00
META-INF Let org.eclipse.jgit.pgm use BooleanTriState 2022-01-19 09:54:37 +01:00
findBugs [spotbugs] Silence NP_BOOLEAN_RETURN_NULL in IgnoreNode#checkIgnored 2020-12-22 10:52:59 +01:00
resources/org/eclipse/jgit Describe: add support for core.abbrev config option 2022-03-02 19:29:48 +01:00
src/org/eclipse/jgit Describe: add support for core.abbrev config option 2022-03-02 19:29:48 +01:00
.classpath Bump minimum required Java version to 11 2021-09-29 17:12:12 +02:00
.fbprefs
.gitignore
.project Revert "Hide Maven target directories from Eclipse" 2010-08-28 09:50:50 +02:00
BUILD Fix stamping to produce stable file timestamps 2020-12-14 15:45:29 +01:00
about.html SHA-1: collision detection support 2017-02-28 16:38:43 -08:00
build.properties
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 6.0.1-SNAPSHOT builds 2021-11-29 17:37:27 +01:00