1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-01 03:57:15 +00:00

Fix revision graph canvas width calculation on repository page (#42762).

When multiple branches point to the same subset of commits, the width of the revision graph canvas increases unnecessarily.
Solution: Avoid indexing branches that reference commits which already have the "space" attribute assigned.

Patch by Leonid Murin (user:murin).


git-svn-id: https://svn.redmine.org/redmine/trunk@24256 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2026-01-05 03:50:22 +00:00
parent 4a032db66a
commit 26fb9102d5

View File

@ -300,7 +300,7 @@ module RepositoriesHelper
heads.sort_by!(&:to_s)
space = nil
heads.each do |head|
if commits_by_scmid.include? head.scmid
if commits_by_scmid.include?(head.scmid) && commits_by_scmid[head.scmid][:space].nil?
space = index_head((space || -1) + 1, head, commits_by_scmid)
end
end