Top Fields Constructors Methods
org.eclipse.jgit.transport

pack-priv Class FetchProcess

extends Object
Class Inheritance
Static Imports
java.nio.charset.StandardCharsets.UTF_8, org.eclipse.jgit.transport.ReceiveCommand.Result.NOT_ATTEMPTED, .ReceiveCommand.Result.OK, .ReceiveCommand.Result.REJECTED_NONFASTFORWARD, .ReceiveCommand.Type.UPDATE_NONFASTFORWARD

Field Summary

Modifier and TypeField and Description
private final HashMap<ObjectId, Ref>
askFor

Set of refs we will actually wind up asking to obtain.

private FetchConnection
private final ArrayList<FetchHeadRecord>
fetchHeadUpdates

Records to be recorded into FETCH_HEAD.

private final HashSet<ObjectId>
have

Objects we know we have locally.

private Map<String, Ref>
private final ArrayList<TrackingRefUpdate>
localUpdates

Updates to local tracking branches (if any).

private final Collection<RefSpec>
negativeRefSpecs

List of things we don't want to fetch from the remote repository or to the local repository.

private final ArrayList<PackLock>
private final Collection<RefSpec>
toFetch

List of things we want to fetch from the remote repository.

private final Transport
transport

Transport we will fetch over.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
private boolean
private void
private TrackingRefUpdate
private void
private void
deleteTrackingRef(final FetchResult result, final BatchRefUpdate batch, final RefSpec spec, final Ref localRef)

pack-priv void
execute(ProgressMonitor monitor, FetchResult result, String initialBranch)

private void
executeImp(final ProgressMonitor monitor, final FetchResult result, String initialBranch)

private Collection<Ref>
private void
private void
expandSingle(RefSpec spec, Set<Ref> matched)

private void
expandWildcard(RefSpec spec, Set<Ref> matched)

private void
private static String
private boolean
isInitialBranchMissing(Map<String, Ref> refsMap, String initialBranch)

private static boolean
private static boolean
isTag(String name)

private boolean
private Map<String, Ref>
private boolean
private void
private void
private void
private void
private void
want(Ref src, RefSpec spec)

private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

askForback to summary
private final HashMap<ObjectId, Ref> askFor

Set of refs we will actually wind up asking to obtain.

connback to summary
private FetchConnection conn
fetchHeadUpdatesback to summary
private final ArrayList<FetchHeadRecord> fetchHeadUpdates

Records to be recorded into FETCH_HEAD.

haveback to summary
private final HashSet<ObjectId> have

Objects we know we have locally.

localRefsback to summary
private Map<String, Ref> localRefs
localUpdatesback to summary
private final ArrayList<TrackingRefUpdate> localUpdates

Updates to local tracking branches (if any).

negativeRefSpecsback to summary
private final Collection<RefSpec> negativeRefSpecs

List of things we don't want to fetch from the remote repository or to the local repository.

packLocksback to summary
private final ArrayList<PackLock> packLocks
toFetchback to summary
private final Collection<RefSpec> toFetch

List of things we want to fetch from the remote repository.

transportback to summary
private final Transport transport

Transport we will fetch over.

Constructor Detail

FetchProcessback to summary
pack-priv FetchProcess(Transport t, Collection<RefSpec> refSpecs)

Method Detail

addUpdateBatchCommandsback to summary
private void addUpdateBatchCommands(FetchResult result, BatchRefUpdate batch) throws TransportException
askForIsCompleteback to summary
private boolean askForIsComplete() throws TransportException
closeConnectionback to summary
private void closeConnection(FetchResult result)
createUpdateback to summary
private TrackingRefUpdate createUpdate(RefSpec spec, ObjectId newId) throws TransportException
deleteStaleTrackingRefsback to summary
private void deleteStaleTrackingRefs(FetchResult result, BatchRefUpdate batch) throws IOException
deleteTrackingRefback to summary
private void deleteTrackingRef(final FetchResult result, final BatchRefUpdate batch, final RefSpec spec, final Ref localRef)
executeback to summary
pack-priv void execute(ProgressMonitor monitor, FetchResult result, String initialBranch) throws NotSupportedException, TransportException
Annotations
@SuppressWarnings:Finally
executeImpback to summary
private void executeImp(final ProgressMonitor monitor, final FetchResult result, String initialBranch) throws NotSupportedException, TransportException
expandAutoFollowTagsback to summary
private Collection<Ref> expandAutoFollowTags() throws TransportException
expandFetchTagsback to summary
private void expandFetchTags() throws TransportException
expandSingleback to summary
private void expandSingle(RefSpec spec, Set<Ref> matched) throws TransportException
expandWildcardback to summary
private void expandWildcard(RefSpec spec, Set<Ref> matched) throws TransportException
fetchObjectsback to summary
private void fetchObjects(ProgressMonitor monitor) throws TransportException
getFirstFailedRefNameback to summary
private static String getFirstFailedRefName(BatchRefUpdate batch)
isInitialBranchMissingback to summary
private boolean isInitialBranchMissing(Map<String, Ref> refsMap, String initialBranch)
isTagback to summary
private static boolean isTag(Ref r)
isTagback to summary
private static boolean isTag(String name)
localHasObjectback to summary
private boolean localHasObject(ObjectId id) throws TransportException
localRefsback to summary
private Map<String, Ref> localRefs() throws TransportException
matchNegativeRefSpecback to summary
private boolean matchNegativeRefSpec(RefSpec spec)
removeFetchHeadRecordback to summary
private void removeFetchHeadRecord(ObjectId want)
removeTrackingRefUpdateback to summary
private void removeTrackingRefUpdate(ObjectId want)
reopenConnectionback to summary
private void reopenConnection() throws NotSupportedException, TransportException
updateFETCH_HEADback to summary
private void updateFETCH_HEAD(FetchResult result) throws IOException
wantback to summary
private void want(Ref src, RefSpec spec) throws TransportException
wantback to summary
private void want(ObjectId id)
wantTagback to summary
private void wantTag(Ref r) throws TransportException