Skip to content

Commit f757de9

Browse files
committed
Fix: Some (very old) repositories have been indentified as empty
We have some rather old archived and/or closed repositories in our redmine installation which definitely have content but have been treated like empty repositories. These old repos do not have a 'heads' key in the extra_info hash but have a 'branches' key instead. Redmine switched from 'branches' to 'heads' in revision 9283 and supports to upgrade from the old to the new format on the next commit. However, supporting both keys means that I don't have to perform dummy commits on inactive repos in order to make the repository viewer work again.
1 parent d8ba7bc commit f757de9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/redmine_git_hosting/patches/repository_git_patch.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def gitolite_hook_key
318318

319319

320320
def empty?
321-
if extra_info.nil? || !extra_info.has_key?('heads')
321+
if extra_info.nil? || ( !extra_info.has_key?('heads') && !extra_info.has_key?('branches') )
322322
return true
323323
else
324324
return false

0 commit comments

Comments
 (0)