Here you can find the source of shortenRemoteRef(final String origin, final String ref)
public static String shortenRemoteRef(final String origin, final String ref)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w . ja va 2s . c o m*/ * Cut the origin part off a remote ref. */ public static String shortenRemoteRef(final String origin, final String ref) { if (!ref.startsWith(origin + "/")) { return ref; } return ref.substring(origin.length() + 1); } }