Fix "fetch pulled too many objects" when auto-following tags
commitcf5f603718484931f8b1c59208066052bb203c5e
authorShawn O. Pearce <spearce@spearce.org>
Tue, 23 Dec 2008 18:03:43 +0000 (23 10:03 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sun, 4 Jan 2009 00:01:51 +0000 (4 01:01 +0100)
tree4d51adc413a92e1a5ec0a4c1444861bb7ab0657c
parentab27f138a4db9a9cd66a01f722d3755aa7106b4e
Fix "fetch pulled too many objects" when auto-following tags

If we don't take into consideration the objects obtained during
the first connection when we open a second to auto-follow tags
we will download a large chunk of the repository a second time.
This is very wasteful of network bandwidth, and is an abuse of
the server.

Because we delay all ref updates until the very end of the fetch
process we need to hold onto the set of objects we requested in
the first connection, and pass that set into the subsequent one
so it can be considered reachable.

Issue: http://code.google.com/p/egit/issues/detail?id=22
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/BaseFetchConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/BasePackFetchConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/FetchConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/FetchProcess.java
org.spearce.jgit/src/org/spearce/jgit/transport/TransportBundle.java
org.spearce.jgit/src/org/spearce/jgit/transport/WalkFetchConnection.java