mirror of
https://github.com/redmine/redmine.git
synced 2026-07-01 00:18:56 +02:00
scm: git: simplify nil check (#18923)
On Ruby, "if []" is true git-svn-id: http://svn.redmine.org/redmine/trunk@13931 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -76,7 +76,7 @@ module Redmine
|
||||
end
|
||||
|
||||
def branches
|
||||
return @branches if !@branches.nil?
|
||||
return @branches if @branches
|
||||
@branches = []
|
||||
cmd_args = %w|branch --no-color --verbose --no-abbrev|
|
||||
git_cmd(cmd_args) do |io|
|
||||
@@ -95,7 +95,7 @@ module Redmine
|
||||
end
|
||||
|
||||
def tags
|
||||
return @tags if !@tags.nil?
|
||||
return @tags if @tags
|
||||
@tags = []
|
||||
cmd_args = %w|tag|
|
||||
git_cmd(cmd_args) do |io|
|
||||
|
||||
Reference in New Issue
Block a user