diff options
author | Shawn Pearce <spearce@spearce.org> | 2015-12-29 15:52:16 -0800 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2015-12-30 15:18:48 -0800 |
commit | fa7ce0e0f3a8973667b0d51966fc9bcb4fdbe505 (patch) | |
tree | 5611e5e2face4c89c68947f76fcc824664d876e5 /org.eclipse.jgit.junit | |
parent | e3acf017486204fb56c33c5edd51d5f2409be7ee (diff) | |
download | jgit-fa7ce0e0f3a8973667b0d51966fc9bcb4fdbe505.tar.gz jgit-fa7ce0e0f3a8973667b0d51966fc9bcb4fdbe505.zip |
ObjectChecker: allow some objects to skip errors
Some ancient objects may be broken, but in a relatively harmless way.
Allow the ObjectChecker caller to whitelist specific objects that are
going to fail checks, but that have been reviewed by a human and decided
the objects are OK enough to permit continued use of.
This avoids needing to rewrite history to scrub the broken objects out.
Honor the git-core fsck.skipList configuration setting when receiving a
push or fetching from a remote repository.
Change-Id: I62bd7c0b0848981f73dd7c752860fd02794233a6
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java index ac9685d375..c941afc786 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java @@ -822,7 +822,7 @@ public class TestRepository<R extends Repository> { break; final byte[] bin = db.open(o, o.getType()).getCachedBytes(); - oc.checkCommit(bin); + oc.checkCommit(o, bin); assertHash(o, bin); } @@ -832,7 +832,7 @@ public class TestRepository<R extends Repository> { break; final byte[] bin = db.open(o, o.getType()).getCachedBytes(); - oc.check(o.getType(), bin); + oc.check(o, o.getType(), bin); assertHash(o, bin); } } |