Skip to content

Commit 28e07ae

Browse files
committed
chore: remove unneeded explicit return statements
1 parent 5b00d3b commit 28e07ae

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

lib/git.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def self.configure
6565
end
6666

6767
def self.config
68-
return Base.config
68+
Base.config
6969
end
7070

7171
def global_config(name = nil, value = nil)

lib/git/diff.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def name_status
2424

2525
def path(path)
2626
@path = path
27-
return self
27+
self
2828
end
2929

3030
def size

lib/git/lib.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def describe(commit_ish = nil, opts = {})
217217

218218
arr_opts << commit_ish if commit_ish
219219

220-
return command('describe', *arr_opts)
220+
command('describe', *arr_opts)
221221
end
222222

223223
# Return the commits that are within the given revision range
@@ -472,7 +472,7 @@ def process_commit_data(data, sha)
472472

473473
hsh['message'] = data.join("\n") + "\n"
474474

475-
return hsh
475+
hsh
476476
end
477477

478478
CAT_FILE_HEADER_LINE = /\A(?<key>\w+) (?<value>.*)\z/
@@ -543,7 +543,7 @@ def process_tag_data(data, name)
543543

544544
hsh['message'] = data.join("\n") + "\n"
545545

546-
return hsh
546+
hsh
547547
end
548548

549549
def process_commit_log_data(data)
@@ -584,7 +584,7 @@ def process_commit_log_data(data)
584584

585585
hsh_array << hsh if hsh
586586

587-
return hsh_array
587+
hsh_array
588588
end
589589

590590
def ls_tree(sha, opts = {})
@@ -758,7 +758,7 @@ def current_branch_state
758758
:unborn
759759
end
760760

761-
return HeadState.new(state, branch_name)
761+
HeadState.new(state, branch_name)
762762
end
763763

764764
def branch_current
@@ -1488,7 +1488,7 @@ def archive(sha, file = nil, opts = {})
14881488
gz.write(file_content)
14891489
end
14901490
end
1491-
return file
1491+
file
14921492
end
14931493

14941494
# returns the current version of git, as an Array of Fixnums.

lib/git/log.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,61 +82,61 @@ def all
8282
def object(objectish)
8383
dirty_log
8484
@object = objectish
85-
return self
85+
self
8686
end
8787

8888
def author(regex)
8989
dirty_log
9090
@author = regex
91-
return self
91+
self
9292
end
9393

9494
def grep(regex)
9595
dirty_log
9696
@grep = regex
97-
return self
97+
self
9898
end
9999

100100
def path(path)
101101
dirty_log
102102
@path = path
103-
return self
103+
self
104104
end
105105

106106
def skip(num)
107107
dirty_log
108108
@skip = num
109-
return self
109+
self
110110
end
111111

112112
def since(date)
113113
dirty_log
114114
@since = date
115-
return self
115+
self
116116
end
117117

118118
def until(date)
119119
dirty_log
120120
@until = date
121-
return self
121+
self
122122
end
123123

124124
def between(sha1, sha2 = nil)
125125
dirty_log
126126
@between = [sha1, sha2]
127-
return self
127+
self
128128
end
129129

130130
def cherry
131131
dirty_log
132132
@cherry = true
133-
return self
133+
self
134134
end
135135

136136
def merges
137137
dirty_log
138138
@merges = true
139-
return self
139+
self
140140
end
141141

142142
def to_s

0 commit comments

Comments
 (0)