aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/resources
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2022-02-21 02:29:27 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2022-03-02 19:29:48 +0100
commit6f175ea6c46488d7d301a74ccc87d7472c314c1a (patch)
treec14132e05dd80ce3922e116360f3a53f532046a7 /org.eclipse.jgit/resources
parent9244c07d73968f668e7579a6c8ff626982229b3f (diff)
downloadjgit-6f175ea6c46488d7d301a74ccc87d7472c314c1a.tar.gz
jgit-6f175ea6c46488d7d301a74ccc87d7472c314c1a.zip
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
Diffstat (limited to 'org.eclipse.jgit/resources')
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
index 6e0d8f5627..e6f4e65e70 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
@@ -366,6 +366,7 @@ invalidAncestryLength=Invalid ancestry length
invalidBooleanValue=Invalid boolean value: {0}.{1}={2}
invalidChannel=Invalid channel {0}
invalidCommitParentNumber=Invalid commit parent number
+invalidCoreAbbrev=Invalid value {0} of option core.abbrev
invalidDepth=Invalid depth: {0}
invalidEncoding=Invalid encoding from git config i18n.commitEncoding: {0}
invalidEncryption=Invalid encryption