]> source.dussan.org Git - jgit.git/commitdiff
UploadPack: Expose advertised refs to callers 07/2507/1
authorShawn O. Pearce <spearce@spearce.org>
Mon, 14 Feb 2011 17:02:57 +0000 (09:02 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 16 Feb 2011 00:32:51 +0000 (16:32 -0800)
Like ReceivePack, callers that embed UploadPack within their
service may wish to see the set of references that were sent
to the client. We already have the map on hand, it just needs
to be exposed with a getter.

Change-Id: I123b23e475860d5bb968906bef59068985088b7b
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

index 19ef019b92e485b665f7dd0114246a49113521d1..e50b01ecc031cd4959e233868b5dd56d703e7abc 100644 (file)
@@ -218,6 +218,11 @@ public class UploadPack {
                return walk;
        }
 
+       /** @return all refs which were advertised to the client. */
+       public final Map<String, Ref> getAdvertisedRefs() {
+               return refs;
+       }
+
        /** @return timeout (in seconds) before aborting an IO operation. */
        public int getTimeout() {
                return timeout;