Honor receive.fsckobjects during any fetch connection
commit81f3119f6acded4bb9baebe60cebce78a2eabb14
authorShawn O. Pearce <spearce@spearce.org>
Wed, 1 Oct 2008 01:31:30 +0000 (30 18:31 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 3 Oct 2008 06:22:55 +0000 (3 08:22 +0200)
tree15faf7e9a79d86a0971a51c1098c75e88e65aa61
parent4e991a37301eba4f7042f0feebedabf7a1d4fdcb
Honor receive.fsckobjects during any fetch connection

If the configuration option receive.fsckobjects is true or if the
application requests it on the Transport each object received over
the wire is validated to pass "git fsck" style rules.  This can be
useful when fetching data from an untrusted source, to ensure that
the incoming objects comply with parsing standards.

The optional checking does require extra CPU on the client side. A
test against git.git (69601 objects 49719 deltas) showed:

    receive.fsckobjects       average time
    --------------------------------------
    false (default)           0m17.588s
    true                      0m18.465s

So the additional checking costs about 5% more in client side time.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/transport/BasePackFetchConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java
org.spearce.jgit/src/org/spearce/jgit/transport/Transport.java
org.spearce.jgit/src/org/spearce/jgit/transport/TransportBundle.java
org.spearce.jgit/src/org/spearce/jgit/transport/WalkFetchConnection.java