Create a new Transport.fetch utility for default fetch behavior
commitb02345608c61dbbb19264cc62ff779e62c6be991
authorShawn O. Pearce <spearce@spearce.org>
Mon, 28 Apr 2008 00:07:01 +0000 (27 20:07 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 11 May 2008 05:16:35 +0000 (11 01:16 -0400)
treecff74d69db1bb90a320d32dbe39f7e7fa5094768
parent66d0cf5616a4897b9983e43558335604a6deb726
Create a new Transport.fetch utility for default fetch behavior

Most application level code using jgit (such as an IDE plugin) will
want to issue a fetch against a Transport and ignore the details of
how/why local tracking refs should be updated.  We hide this away
in our Transport.fetch method and offer the final results back as
a new FetchResult object, which the application can then format for
display as it desires.

Tracking refs are updated according to the RefSpecs configured as
part of the RemoteConfig.  We now honor the force/non-force update
requests configured in each specification, correctly aborting an
update if it would not be a fast-forward type of update.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/lib/Constants.java
org.spearce.jgit/src/org/spearce/jgit/pgm/Fetch.java
org.spearce.jgit/src/org/spearce/jgit/transport/FetchConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/FetchHeadRecord.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/transport/FetchProcess.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/transport/FetchResult.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/transport/TrackingRefUpdate.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/transport/Transport.java