public class UploadPack
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Set<ObjectId> |
advertised
Objects we sent in our advertisement list, clients can ask for these.
|
private AdvertiseRefsHook |
advertiseRefsHook
Hook used while advertising the refs to the client.
|
private boolean |
advertiseRefsHookCalled
Whether the
advertiseRefsHook has been invoked. |
private boolean |
biDirectionalPipe
Is the client connection a bi-directional socket or pipe?
|
private CachedPackUriProvider |
cachedPackUriProvider |
private boolean |
clientRequestedV2
Whether the client requested to use protocol V2 through a side
channel (such as the Git-Protocol HTTP header).
|
private RevFlag |
COMMON
Marked on objects in
commonBase . |
private java.util.Set<RevObject> |
commonBase
Objects on both sides, these don't have to be sent.
|
private FetchRequest |
currentRequest
Request this instance is handling.
|
private Repository |
db
Database we read the objects from.
|
private UploadPack.ErrorWriter |
errOut |
private java.io.OutputStream |
msgOut |
private GitProtocolConstants.MultiAck |
multiAck |
private boolean |
noDone |
private java.lang.Boolean |
okToGiveUp
null if
commonBase should be examined again. |
private int |
oldestTime
Commit time of the oldest common commit, in seconds.
|
private PackConfig |
packConfig
Configuration to pass into the PackWriter.
|
private PacketLineIn |
pckIn |
private RevFlag |
PEER_HAS
Marked on objects both we and the client have.
|
private PostUploadHook |
postUploadHook
Hook for taking post upload actions.
|
private PreUploadHook |
preUploadHook
Hook handling the various upload phases.
|
private ProtocolV2Hook |
protocolV2Hook
Hook used while processing Git protocol v2 requests.
|
private java.io.InputStream |
rawIn |
private UploadPack.ResponseBufferedOutputStream |
rawOut |
private RefFilter |
refFilter
Filter used while advertising the refs to the client.
|
private java.util.Map<java.lang.String,Ref> |
refs
Refs eligible for advertising to the client, set using
setAdvertisedRefs(java.util.Map<java.lang.String, org.eclipse.jgit.lib.Ref>) . |
private UploadPack.RequestValidator |
requestValidator |
private RevFlag |
SATISFIED
Objects where we found a path from the want list to a common base.
|
private RevFlagSet |
SAVE |
private boolean |
sentReady |
private PackStatistics |
statistics |
private int |
timeout
Timeout in seconds to wait for client interaction.
|
private InterruptTimer |
timer
Timer to manage
timeout . |
private TransferConfig |
transferConfig
Configuration for various transfer options.
|
(package private) java.lang.String |
userAgent
Caller user agent
|
private RevWalk |
walk
Revision traversal support over
db . |
private RevFlag |
WANT
Marked on objects the client has asked us to give them.
|
private java.util.Set<RevObject> |
wantAll
Objects the client wants to obtain.
|
private java.util.Set<ObjectId> |
wantIds
Raw ObjectIds the client has asked for, before validating them.
|
Constructor and Description |
---|
UploadPack(Repository copyFrom)
Create a new pack upload for an open repository.
|
Modifier and Type | Method and Description |
---|---|
private void |
addCommonBase(RevObject o) |
private void |
addTagChain(RevObject o,
PackWriter pw) |
private static void |
checkNotAdvertisedWants(UploadPack up,
java.util.List<ObjectId> notAdvertisedWants,
java.util.Collection<Ref> visibleRefs) |
private static void |
checkNotAdvertisedWantsUsingBitmap(ObjectReader reader,
BitmapIndex bitmapIndex,
java.util.List<ObjectId> notAdvertisedWants,
java.util.Set<ObjectId> reachableFrom) |
private static void |
checkReachabilityByWalkingObjects(ObjectWalk walk,
java.util.List<RevObject> wants,
java.util.Set<ObjectId> reachableFrom) |
private void |
computeShallowsAndUnshallows(FetchRequest req,
UploadPack.IOConsumer<ObjectId> shallowFunc,
UploadPack.IOConsumer<ObjectId> unshallowFunc,
java.util.List<ObjectId> deepenNots) |
private java.util.Map<java.lang.String,Ref> |
exactRefs(java.util.List<java.lang.String> names)
Read refs on behalf of the client.
|
private void |
fetchV2(PacketLineOut pckOut) |
private Ref |
findRef(java.lang.String name)
Find a ref in the usual search path on behalf of the client.
|
private static void |
findSymrefs(RefAdvertiser adv,
java.util.Map<java.lang.String,Ref> refs) |
private java.util.Map<java.lang.String,Ref> |
getAdvertisedOrDefaultRefs() |
java.util.Map<java.lang.String,Ref> |
getAdvertisedRefs()
Get refs which were advertised to the client.
|
AdvertiseRefsHook |
getAdvertiseRefsHook()
Get the hook used while advertising the refs to the client.
|
int |
getDepth()
Returns the clone/fetch depth.
|
long |
getFilterBlobLimit()
Deprecated.
Use
getFilterSpec() instead |
private java.util.Map<java.lang.String,Ref> |
getFilteredRefs(java.util.Collection<java.lang.String> refPrefixes) |
FilterSpec |
getFilterSpec()
Returns the filter spec for the current request.
|
java.io.OutputStream |
getMessageOutputStream()
Get an underlying stream for sending messages to the client
|
java.lang.String |
getPeerUserAgent()
Get the user agent of the client.
|
PostUploadHook |
getPostUploadHook()
Get the configured post upload hook.
|
PreUploadHook |
getPreUploadHook()
Get the configured pre upload hook.
|
ProtocolV2Hook |
getProtocolV2Hook()
Get the currently installed protocol v2 hook.
|
RefFilter |
getRefFilter()
Get the filter used while advertising the refs to the client.
|
Repository |
getRepository()
Get the repository this upload is reading from.
|
UploadPack.RequestPolicy |
getRequestPolicy()
Get policy used by the service to validate client requests
|
RevWalk |
getRevWalk()
Get the RevWalk instance used by this connection.
|
PackStatistics |
getStatistics()
Get the PackWriter's statistics if a pack was sent to the client.
|
int |
getTimeout()
Get timeout (in seconds) before aborting an IO operation.
|
private java.util.List<java.lang.String> |
getV2CapabilityAdvertisement() |
(package private) static java.util.stream.Stream<Ref> |
importantRefsFirst(java.util.Collection<Ref> visibleRefs) |
boolean |
isBiDirectionalPipe()
Whether this class expects a bi-directional pipe opened between the
client and itself.
|
boolean |
isSideBand()
Check whether the client expects a side-band stream.
|
private void |
lsRefsV2(PacketLineOut pckOut) |
private static java.util.Map<java.lang.String,Ref> |
mapRefs(java.util.Map<java.lang.String,Ref> refs,
java.util.List<java.lang.String> names)
Returns the specified references.
|
private boolean |
negotiate(FetchRequest req,
PackStatistics.Accumulator accumulator,
PacketLineOut pckOut) |
private static java.util.List<RevObject> |
objectIdsToRevObjects(RevWalk walk,
java.lang.Iterable<ObjectId> objectIds) |
private static RevCommit |
objectIdToRevCommit(RevWalk walk,
ObjectId objectId)
Translate an object id to a RevCommit.
|
private boolean |
okToGiveUp() |
private boolean |
okToGiveUpImp() |
private void |
parseWants() |
private ObjectId |
processHaveLines(java.util.List<ObjectId> peerHas,
ObjectId last,
PacketLineOut out) |
private static java.util.Set<ObjectId> |
refIdSet(java.util.Collection<Ref> refs) |
private static ObjectId |
refToObjectId(Ref ref) |
void |
sendAdvertisedRefs(RefAdvertiser adv)
Generate an advertisement of available refs and capabilities.
|
void |
sendAdvertisedRefs(RefAdvertiser adv,
java.lang.String serviceName)
Generate an advertisement of available refs and capabilities.
|
void |
sendMessage(java.lang.String what)
Send a message to the client, if it supports receiving them.
|
private void |
sendPack(PackStatistics.Accumulator accumulator,
FetchRequest req,
java.util.Collection<Ref> allTags,
java.util.List<ObjectId> unshallowCommits,
java.util.List<ObjectId> deepenNots,
PacketLineOut pckOut)
Send the requested objects to the client.
|
private void |
sendPack(ProgressMonitor pm,
PacketLineOut pckOut,
java.io.OutputStream packOut,
FetchRequest req,
PackStatistics.Accumulator accumulator,
java.util.Collection<Ref> allTags,
java.util.List<ObjectId> unshallowCommits,
java.util.List<ObjectId> deepenNots)
Send the requested objects to the client.
|
private boolean |
serveOneCommandV2(PacketLineOut pckOut) |
private void |
service(PacketLineOut pckOut) |
private void |
serviceV2(PacketLineOut pckOut) |
void |
setAdvertisedRefs(java.util.Map<java.lang.String,Ref> allRefs)
Set the refs advertised by this UploadPack.
|
void |
setAdvertiseRefsHook(AdvertiseRefsHook advertiseRefsHook)
Set the hook used while advertising the refs to the client.
|
void |
setBiDirectionalPipe(boolean twoWay)
Set whether this class will assume the socket is a fully bidirectional
pipe between the two peers
|
void |
setCachedPackUriProvider(CachedPackUriProvider p) |
void |
setExtraParameters(java.util.Collection<java.lang.String> params)
Set the Extra Parameters provided by the client.
|
void |
setPackConfig(PackConfig pc)
Set the configuration used by the pack generator.
|
void |
setPostUploadHook(PostUploadHook hook)
Set the hook for post upload actions (logging, repacking).
|
void |
setPreUploadHook(PreUploadHook hook)
Set the hook that controls how this instance will behave.
|
void |
setProtocolV2Hook(ProtocolV2Hook hook)
Set the protocol V2 hook.
|
void |
setRefFilter(RefFilter refFilter)
Set the filter used while advertising the refs to the client.
|
void |
setRequestPolicy(UploadPack.RequestPolicy policy)
Set the policy used to enforce validation of a client's want list.
|
void |
setRequestValidator(UploadPack.RequestValidator validator)
Set custom validator for client want list.
|
void |
setTimeout(int seconds)
Set the timeout before willing to abort an IO call.
|
void |
setTransferConfig(TransferConfig tc)
Set configuration controlling transfer options.
|
void |
upload(java.io.InputStream input,
java.io.OutputStream output,
java.io.OutputStream messages)
Execute the upload task on the socket.
|
void |
uploadWithExceptionPropagation(java.io.InputStream input,
java.io.OutputStream output,
java.io.OutputStream messages)
Execute the upload task on the socket.
|
private boolean |
useProtocolV2() |
private void |
verifyClientShallow(java.util.Set<ObjectId> shallowCommits) |
private void |
want(RevObject obj) |
private java.util.Map<java.lang.String,ObjectId> |
wantedRefs(FetchV2Request req) |
private boolean |
wantSatisfied(RevObject want) |
private final Repository db
private PackConfig packConfig
private TransferConfig transferConfig
private int timeout
private boolean biDirectionalPipe
If true, this class assumes it can perform multiple read and write cycles with the client over the input and output streams. This matches the functionality available with a standard TCP/IP connection, or a local operating system or in-memory pipe.
If false, this class runs in a read everything then output results mode, making it suitable for single round-trip systems RPCs such as HTTP.
private InterruptTimer timer
timeout
.private boolean clientRequestedV2
private java.io.InputStream rawIn
private UploadPack.ResponseBufferedOutputStream rawOut
private PacketLineIn pckIn
private java.io.OutputStream msgOut
private UploadPack.ErrorWriter errOut
private java.util.Map<java.lang.String,Ref> refs
setAdvertisedRefs(java.util.Map<java.lang.String, org.eclipse.jgit.lib.Ref>)
.private ProtocolV2Hook protocolV2Hook
private AdvertiseRefsHook advertiseRefsHook
private boolean advertiseRefsHookCalled
advertiseRefsHook
has been invoked.private RefFilter refFilter
private PreUploadHook preUploadHook
private PostUploadHook postUploadHook
java.lang.String userAgent
private java.util.Set<ObjectId> wantIds
private final java.util.Set<RevObject> wantAll
private final java.util.Set<RevObject> commonBase
private int oldestTime
private java.lang.Boolean okToGiveUp
commonBase
should be examined again.private boolean sentReady
private java.util.Set<ObjectId> advertised
private final RevFlag WANT
private final RevFlag PEER_HAS
private final RevFlag COMMON
commonBase
.private final RevFlag SATISFIED
private final RevFlagSet SAVE
private UploadPack.RequestValidator requestValidator
private GitProtocolConstants.MultiAck multiAck
private boolean noDone
private PackStatistics statistics
private FetchRequest currentRequest
pre upload
hooks
. They receive a reference this instance and invoke methods like
getDepth() to get information about the request.private CachedPackUriProvider cachedPackUriProvider
public UploadPack(Repository copyFrom)
copyFrom
- the source repository.public final Repository getRepository()
public final RevWalk getRevWalk()
public final java.util.Map<java.lang.String,Ref> getAdvertisedRefs()
setAdvertisedRefs(Map)
has not been called yet.public void setAdvertisedRefs(@Nullable java.util.Map<java.lang.String,Ref> allRefs)
Intended to be called from a
PreUploadHook
.
allRefs
- explicit set of references to claim as advertised by this
UploadPack instance. This overrides any references that may
exist in the source repository. The map is passed to the
configured getRefFilter()
. If null, assumes all refs
were advertised.public int getTimeout()
public void setTimeout(int seconds)
seconds
- number of seconds to wait (with no data transfer occurring)
before aborting an IO read or write operation with the
connected client.public boolean isBiDirectionalPipe()
public void setBiDirectionalPipe(boolean twoWay)
twoWay
- if true, this class will assume the socket is a fully
bidirectional pipe between the two peers and takes advantage
of that by first transmitting the known refs, then waiting to
read commands. If false, this class assumes it must read the
commands before writing output and does not perform the
initial advertising.public UploadPack.RequestPolicy getRequestPolicy()
public void setRequestPolicy(UploadPack.RequestPolicy policy)
policy
- the policy used to enforce validation of a client's want list.
By default the policy is
UploadPack.RequestPolicy.ADVERTISED
,
which is the Git default requiring clients to only ask for an
object that a reference directly points to. This may be
relaxed to
UploadPack.RequestPolicy.REACHABLE_COMMIT
or
UploadPack.RequestPolicy.REACHABLE_COMMIT_TIP
when callers have setBiDirectionalPipe(boolean)
set
to false. Overrides any policy specified in a
TransferConfig
.public void setRequestValidator(@Nullable UploadPack.RequestValidator validator)
validator
- custom validator for client want list.public AdvertiseRefsHook getAdvertiseRefsHook()
public RefFilter getRefFilter()
public void setAdvertiseRefsHook(@Nullable AdvertiseRefsHook advertiseRefsHook)
If the AdvertiseRefsHook
chooses to
call setAdvertisedRefs(Map)
, only refs set by this hook
and selected by the RefFilter
will be shown to the client.
advertiseRefsHook
- the hook; may be null to show all refs.public void setProtocolV2Hook(@Nullable ProtocolV2Hook hook)
hook
- the hook; if null no special actions are taken.public ProtocolV2Hook getProtocolV2Hook()
public void setRefFilter(@Nullable RefFilter refFilter)
Only refs allowed by this filter will be sent to the client. The filter
is run against the refs specified by the
AdvertiseRefsHook
(if applicable). If
null or not set, uses the filter implied by the
TransferConfig
.
refFilter
- the filter; may be null to show all refs.public PreUploadHook getPreUploadHook()
public void setPreUploadHook(@Nullable PreUploadHook hook)
hook
- the hook; if null no special actions are taken.public PostUploadHook getPostUploadHook()
public void setPostUploadHook(@Nullable PostUploadHook hook)
hook
- the hook; if null no special actions are taken.public void setPackConfig(@Nullable PackConfig pc)
pc
- configuration controlling packing parameters. If null the
source repository's settings will be used.public void setTransferConfig(@Nullable TransferConfig tc)
tc
- configuration controlling transfer options. If null the source
repository's settings will be used.public boolean isSideBand() throws RequestNotYetReadException
RequestNotYetReadException
- if the client's request has not yet been read from the wire, so
we do not know if they expect side-band. Note that the client
may have already written the request, it just has not been
read.public void setExtraParameters(java.util.Collection<java.lang.String> params)
These are parameters passed by the client through a side channel such as the Git-Protocol HTTP header, to allow a client to request a newer response format while remaining compatible with older servers that do not understand different request formats.
params
- parameters supplied by the client, split at colons or NUL
bytes.public void setCachedPackUriProvider(@Nullable CachedPackUriProvider p)
p
- provider of URIs corresponding to cached packs (to support
the packfile URIs feature)private boolean useProtocolV2()
public void upload(java.io.InputStream input, java.io.OutputStream output, @Nullable java.io.OutputStream messages) throws java.io.IOException
Same as uploadWithExceptionPropagation(java.io.InputStream, java.io.OutputStream, java.io.OutputStream)
except that the thrown
exceptions are handled in the method, and the error messages are sent to
the clients.
Call this method if the caller does not have an error handling mechanism.
Call uploadWithExceptionPropagation(java.io.InputStream, java.io.OutputStream, java.io.OutputStream)
if the caller wants to have
its own error handling mechanism.
input
- output
- messages
- java.io.IOException
public void uploadWithExceptionPropagation(java.io.InputStream input, java.io.OutputStream output, @Nullable java.io.OutputStream messages) throws ServiceMayNotContinueException, java.io.IOException
If the client passed extra parameters (e.g., "version=2") through a side channel, the caller must call setExtraParameters first to supply them.
input
- raw input to read client commands from. Caller must ensure the
input is buffered, otherwise read performance may suffer.output
- response back to the Git network client, to write the pack
data onto. Caller must ensure the output is buffered,
otherwise write performance may suffer.messages
- secondary "notice" channel to send additional messages out
through. When run over SSH this should be tied back to the
standard error channel of the command execution. For most
other network connections this should be null.ServiceMayNotContinueException
- thrown if one of the hooks throws this.java.io.IOException
- thrown if the server or the client I/O fails, or there's an
internal server error.public PackStatistics getStatistics()
private java.util.Map<java.lang.String,Ref> getAdvertisedOrDefaultRefs() throws java.io.IOException
java.io.IOException
private java.util.Map<java.lang.String,Ref> getFilteredRefs(java.util.Collection<java.lang.String> refPrefixes) throws java.io.IOException
java.io.IOException
@NonNull private static java.util.Map<java.lang.String,Ref> mapRefs(java.util.Map<java.lang.String,Ref> refs, java.util.List<java.lang.String> names)
This produces an immutable map containing whatever subset of the
refs named by the caller are present in the supplied refs
map.
refs
- Map to search for refs to return.names
- which refs to search for in refs
.@NonNull private java.util.Map<java.lang.String,Ref> exactRefs(java.util.List<java.lang.String> names) throws java.io.IOException
This checks whether the refs are present in the ref advertisement since otherwise the client might not be supposed to be able to read them.
names
- unabbreviated names of references.java.io.IOException
- on failure to read a ref or check it for visibility.@Nullable private Ref findRef(java.lang.String name) throws java.io.IOException
This checks that the ref is present in the ref advertisement since otherwise the client might not be supposed to be able to read it.
name
- short name of the ref to find, e.g. "master" to find
"refs/heads/master".null
if it is not visible or
does not exist.java.io.IOException
- on failure to read the ref or check it for visibility.private void service(PacketLineOut pckOut) throws java.io.IOException
java.io.IOException
private void lsRefsV2(PacketLineOut pckOut) throws java.io.IOException
java.io.IOException
private java.util.Map<java.lang.String,ObjectId> wantedRefs(FetchV2Request req) throws java.io.IOException
java.io.IOException
private void fetchV2(PacketLineOut pckOut) throws java.io.IOException
java.io.IOException
private boolean serveOneCommandV2(PacketLineOut pckOut) throws java.io.IOException
java.io.IOException
private java.util.List<java.lang.String> getV2CapabilityAdvertisement()
private void serviceV2(PacketLineOut pckOut) throws java.io.IOException
java.io.IOException
private void computeShallowsAndUnshallows(FetchRequest req, UploadPack.IOConsumer<ObjectId> shallowFunc, UploadPack.IOConsumer<ObjectId> unshallowFunc, java.util.List<ObjectId> deepenNots) throws java.io.IOException
java.io.IOException
private void verifyClientShallow(java.util.Set<ObjectId> shallowCommits) throws java.io.IOException, PackProtocolException
java.io.IOException
PackProtocolException
public void sendAdvertisedRefs(RefAdvertiser adv) throws java.io.IOException, ServiceMayNotContinueException
adv
- the advertisement formatter.java.io.IOException
- the formatter failed to write an advertisement.ServiceMayNotContinueException
- the hook denied advertisement.public void sendAdvertisedRefs(RefAdvertiser adv, @Nullable java.lang.String serviceName) throws java.io.IOException, ServiceMayNotContinueException
adv
- the advertisement formatter.serviceName
- if not null, also output "# service=serviceName" followed by a
flush packet before the advertisement. This is required
in v0 of the HTTP protocol, described in Git's
Documentation/technical/http-protocol.txt.java.io.IOException
- the formatter failed to write an advertisement.ServiceMayNotContinueException
- the hook denied advertisement.public void sendMessage(java.lang.String what)
If the client doesn't support receiving messages, the message will be discarded, with no other indication to the caller or to the client.
what
- string describing the problem identified by the hook. The
string must not end with an LF, and must not contain an LF.public java.io.OutputStream getMessageOutputStream()
public int getDepth()
@Deprecated public final long getFilterBlobLimit()
getFilterSpec()
insteadgetFilterSpec().getBlobLimit()
.public final FilterSpec getFilterSpec()
public java.lang.String getPeerUserAgent()
If the client is new enough to use agent=
capability that value
will be returned. Older HTTP clients may also supply their version using
the HTTP User-Agent
header. The capability overrides the HTTP
header if both are available.
When an HTTP request has been received this method returns the HTTP
User-Agent
header value until capabilities have been parsed.
private boolean negotiate(FetchRequest req, PackStatistics.Accumulator accumulator, PacketLineOut pckOut) throws java.io.IOException
java.io.IOException
private ObjectId processHaveLines(java.util.List<ObjectId> peerHas, ObjectId last, PacketLineOut out) throws java.io.IOException
java.io.IOException
private void parseWants() throws java.io.IOException
java.io.IOException
private void want(RevObject obj)
private static void checkNotAdvertisedWantsUsingBitmap(ObjectReader reader, BitmapIndex bitmapIndex, java.util.List<ObjectId> notAdvertisedWants, java.util.Set<ObjectId> reachableFrom) throws java.io.IOException
java.io.IOException
private static void checkReachabilityByWalkingObjects(ObjectWalk walk, java.util.List<RevObject> wants, java.util.Set<ObjectId> reachableFrom) throws java.io.IOException
java.io.IOException
private static void checkNotAdvertisedWants(UploadPack up, java.util.List<ObjectId> notAdvertisedWants, java.util.Collection<Ref> visibleRefs) throws java.io.IOException
java.io.IOException
static java.util.stream.Stream<Ref> importantRefsFirst(java.util.Collection<Ref> visibleRefs)
@Nullable private static RevCommit objectIdToRevCommit(RevWalk walk, ObjectId objectId)
walk
- walk on the relevant object storaeobjectId
- Object Idprivate static java.util.List<RevObject> objectIdsToRevObjects(RevWalk walk, java.lang.Iterable<ObjectId> objectIds) throws MissingObjectException, java.io.IOException
MissingObjectException
java.io.IOException
private void addCommonBase(RevObject o)
private boolean okToGiveUp() throws PackProtocolException
PackProtocolException
private boolean okToGiveUpImp() throws PackProtocolException
PackProtocolException
private boolean wantSatisfied(RevObject want) throws java.io.IOException
java.io.IOException
private void sendPack(PackStatistics.Accumulator accumulator, FetchRequest req, @Nullable java.util.Collection<Ref> allTags, java.util.List<ObjectId> unshallowCommits, java.util.List<ObjectId> deepenNots, PacketLineOut pckOut) throws java.io.IOException
accumulator
- where to write statistics about the content of the pack.req
- request in processallTags
- refs to search for annotated tags to include in the pack if
the #OPTION_INCLUDE_TAG
capability was requested.unshallowCommits
- shallow commits on the client that are now becoming unshallowdeepenNots
- objects that the client specified using --shallow-excludepckOut
- output writerjava.io.IOException
- if an error occurred while generating or writing the pack.private void sendPack(ProgressMonitor pm, PacketLineOut pckOut, java.io.OutputStream packOut, FetchRequest req, PackStatistics.Accumulator accumulator, @Nullable java.util.Collection<Ref> allTags, java.util.List<ObjectId> unshallowCommits, java.util.List<ObjectId> deepenNots) throws java.io.IOException
pm
- progress monitorpckOut
- PacketLineOut that shares the output with packOutpackOut
- packfile outputreq
- request being processedaccumulator
- where to write statistics about the content of the pack.allTags
- refs to search for annotated tags to include in the pack if
the #OPTION_INCLUDE_TAG
capability was requested.unshallowCommits
- shallow commits on the client that are now becoming unshallowdeepenNots
- objects that the client specified using --shallow-excludejava.io.IOException
- if an error occurred while generating or writing the pack.private static void findSymrefs(RefAdvertiser adv, java.util.Map<java.lang.String,Ref> refs)
private void addTagChain(RevObject o, PackWriter pw) throws java.io.IOException
java.io.IOException