Merge branch 'main' into fix-24635

This commit is contained in:
Excellencedev
2026-01-02 08:42:22 +01:00
committed by GitHub
10 changed files with 208 additions and 327 deletions
+11
View File
@@ -220,3 +220,14 @@ func (ref RefName) RefWebLinkPath() string {
}
return string(refType) + "/" + util.PathEscapeSegments(ref.ShortName())
}
func ParseRefSuffix(ref string) (string, string) {
// Partially support https://git-scm.com/docs/gitrevisions
if idx := strings.Index(ref, "@{"); idx != -1 {
return ref[:idx], ref[idx:]
}
if idx := strings.Index(ref, "^"); idx != -1 {
return ref[:idx], ref[idx:]
}
return ref, ""
}