Bug 255682 - Short Git commit references are sometimes converted to SVNWeb links
Summary: Short Git commit references are sometimes converted to SVNWeb links
Status: In Progress
Alias: None
Product: Services
Classification: Unclassified
Component: Bug Tracker (show other bugs)
Version: unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: Oleksandr Tymoshenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 14:15 UTC by Jan Beich
Modified: 2021-05-08 08:45 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2021-05-07 14:15:04 UTC
Some Git commits may start with decimal digits and not contain any obviously hexadecimal digits like [a-f]. For example, in bug 255679 comment 2 I've pasted "ports <12-digit abbreviation>" but Bugzilla automatically appended "r" then linked to https://svnweb.freebsd.org/.

Let's test more:
- ports 111198 (exists in both SVN and Git)
- ports 123456789012 (doesn't exist, too large for SVN)
Comment 1 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2021-05-08 02:34:16 UTC
I changed the priorities for links regexp. If it's a hexadecimal number 6 to 40 characters long - consider it a git revision, only numbers - SVN. There is still an overlap between SVN And git commits, like in your example, but there is no clear way to resolve it without querying repos I'm afraid.