Skip to content

Commit 185aa24

Browse files
hsbtclaude
andcommitted
Show short commit SHA for git-era revisions
The r prefix is now applied only to numeric SVN revisions. A 40-hex revision is truncated to 11 characters like the previous sha1 display. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 35c15bb commit 185aa24

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/views/reports/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
diffuri = report.diffuri
3636

37-
if report.revision
37+
if report.revision&.match?(/\A\d+\z/)
3838
revision = "r#{report.revision}"
3939
elsif report.sha1
4040
revision = report.sha1[0, 11]
@@ -108,7 +108,7 @@
108108
<td class="datetime"><%= link_to report.sjstdt, report.loguri, title: report.jstdt %></td>
109109
<td class="branch"><%= link_to report.branch, report.recenturi %></td>
110110
<td class="option"><%= report.option %></td>
111-
<td class="revision"><%= report.patchlevel + " " if report.patchlevel %><%= report.revision %></td>
111+
<td class="revision"><%= report.patchlevel + " " if report.patchlevel %><%= report.revision&.match?(/\A\d+\z/) ? report.revision : report.revision.to_s[0, 11] %></td>
112112
<% if report.build %>
113113
<td class="build" colspan="3"><%= report.build %></td>
114114
<% else %>

0 commit comments

Comments
 (0)