]> source.dussan.org Git - jgit.git/commit
DirCache: support option index.skipHash 16/200916/2
authorMatthias Sohn <matthias.sohn@sap.com>
Mon, 27 Mar 2023 20:23:11 +0000 (22:23 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 28 Mar 2023 21:16:08 +0000 (23:16 +0200)
commit23b9693a75b899c97da8a04c0b531874b225d236
treea710a29fe5dd8792cb530910376b7ced2e45f770
parent3212c8fa387995cecbb95de50508ba142f772203
DirCache: support option index.skipHash

Support the new option index.skipHash which was introduced in git 2.40
[1]. If it is set to true skip computing the git index checksum. This
accelerates Git commands that manipulate the index, such as git add, git
commit, or git status. Instead of storing the checksum, write a trailing
set of bytes with value zero, indicating that the computation was
skipped.

Accept a skipped checksum consisting of 20 null bytes when reading the
index since the option could have been set to true at the time when the
index was written.

[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-indexskipHash

Bug: 581723
Change-Id: I28ebe44c5ca1cbcb882438665d686452a0c111b2
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBasicTest.java
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/NullMessageDigest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java