We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 106dbf0 commit fb5af24Copy full SHA for fb5af24
lib/redmine_git_hosting/patches/repositories_controller_patch.rb
@@ -21,7 +21,7 @@ def self.included(base)
21
module InstanceMethods
22
23
def show_with_git_hosting(&block)
24
- if @repository.is_a?(Repository::Git) and @rev.blank?
+ if @repository.is_a?(Repository::Git) && @repository.empty?
25
# Fake list of repos
26
@repositories = @project.gitolite_repos
27
render :action => 'git_instructions'
lib/redmine_git_hosting/patches/repository_git_patch.rb
@@ -366,6 +366,15 @@ def gitolite_hook_key
366
end
367
368
369
+ def empty?
370
+ if extra_info.nil? || !extra_info.has_key?('heads')
371
+ return true
372
+ else
373
+ return false
374
+ end
375
376
+
377
378
private
379
380
0 commit comments