summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2015-01-21 12:04:24 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2015-01-21 12:04:24 +0000
commit585642d072d82a061d4155f0f3aa640f2754bd6d (patch)
treef18e345aa9b323f9d79bd85bd9f4752baa7bb6c0 /lib
parent693badf5ff0b12feafdf652e35249efd39c0b512 (diff)
downloadredmine-585642d072d82a061d4155f0f3aa640f2754bd6d.tar.gz
redmine-585642d072d82a061d4155f0f3aa640f2754bd6d.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/git_adapter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index 4980b4138..7395bc2b9 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -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|