jgit/org.eclipse.jgit.http.server
Shawn O. Pearce 04759f3274 RefAdvertiser: Avoid object parsing
It isn't strictly necessary to validate every reference's target
object is reachable in the repository before advertising it to a
client. This is an expensive operation when there are thousands of
references, and its very unlikely that a reference uses a missing
object, because garbage collection proceeds from the references and
walks down through the graph. So trying to hide a dangling reference
from clients is relatively pointless.

Even if we are trying to avoid giving a client a corrupt repository,
this simple check isn't sufficient.  It is possible for a reference to
point to a valid commit, but that commit to have a missing blob in its
root tree.  This can be caused by staging a file into the index,
waiting several weeks, then committing that file while also racing
against a prune.  The prune may delete the blob, since its
modification time is more than 2 weeks ago, but retain the commit,
since its modification time is right now.

Such graph corruption is already caught during PackWriter as it
enumerates the graph from the client's want list and digs back
to the roots or common base.  Leave the reference validation also
for that same phase, where we know we have to parse the object to
support the enumeration.

Change-Id: Iee70ead0d3ed2d2fcc980417d09d7a69b05f5c2f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-02-02 17:16:32 -08:00
..
.settings Run formatter on edited lines via save action 2010-08-26 12:33:09 -05:00
META-INF Qualify post 0.10 builds 2010-12-17 15:49:30 +01:00
resources/org/eclipse/jgit/http/server Externalize strings from JGit 2010-05-19 14:37:16 -07:00
src/org/eclipse/jgit/http/server RefAdvertiser: Avoid object parsing 2011-02-02 17:16:32 -08:00
.classpath Externalize strings from JGit 2010-05-19 14:37:16 -07:00
.fbprefs Simple dumb HTTP server for Git 2010-01-12 12:01:24 -08:00
.gitignore Simple dumb HTTP server for Git 2010-01-12 12:01:24 -08:00
.project Revert "Hide Maven target directories from Eclipse" 2010-08-28 09:50:50 +02:00
build.properties Simple dumb HTTP server for Git 2010-01-12 12:01:24 -08:00
plugin.properties Correct bundle, provider names to be consistent 2010-01-23 11:42:15 -08:00
pom.xml Build http.server source JAR 2011-01-20 14:46:27 -08:00