Skip to contentSkip to conversation

Expose the advertised refs to ReceivePack hooks

PATCH New Shawn O. Pearce 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Expose the advertised refs to ReceivePack hooks

Hooks may want to be able to consider what the client was shown, so they can make decisions based on that information.

---
 .../org/spearce/jgit/transport/ReceivePack.java    |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java +5 -0
index 95519b8..76d11c4 100644
@@ -155,6 +155,11 @@ public final RevWalk getRevWalk() {
 		return walk;
 	}
 
+	/** @return all refs which were advertised to the client. */
+	public final Map<String, Ref> getAdvertisedRefs() {
+		return refs;
+	}
+
 	/**
 	 * @return true if this instance will verify received objects are formatted
 	 *         correctly. Validating objects requires more CPU time on this side
Signature · 1 line
1.6.1.302.gccd4d