public static String getPath(final GitReference ref) {
        if (ref == null) {
            return null;
        }
        String name = ref.ref();
        if (!TextUtils.isEmpty(name) && name.startsWith(PREFIX_REFS)) {
            return name.substring(PREFIX_REFS.length());
        } else {
            return name;
        }
    }
Get path of ref with leading 'refs/' segment removed if present

@param ref
@return full path
app/src/main/java/com/github/pockethub/android/core/ref/RefUtils.java