Skip to content

Commit aa0a03c

Browse files
committed
fix variable names
1 parent cacac90 commit aa0a03c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/rugged/tree.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,29 +122,29 @@ class Tree
122122
# diff = tree.diff(other_tree)
123123
#
124124

125-
def self.diff(repo, _self, other = nil, options = {})
126-
if _self && !_self.is_a?(Rugged::Tree)
125+
def self.diff(repo, tree, other_tree = nil, options = {})
126+
if tree && !tree.is_a?(Rugged::Tree)
127127
raise TypeError, "At least a Rugged::Tree object is required for diffing"
128128
end
129129

130-
if other.nil?
131-
if _self.nil?
130+
if other_tree.nil?
131+
if tree.nil?
132132
raise TypeError, "Need 'old' or 'new' for diffing"
133133
else
134-
diff_tree_to_tree repo, _self, nil, options
134+
diff_tree_to_tree repo, tree, nil, options
135135
end
136136
else
137-
if other.is_a?(::String)
138-
other = Rugged::Object.rev_parse repo, other
137+
if other_tree.is_a?(::String)
138+
other_tree = Rugged::Object.rev_parse repo, other_tree
139139
end
140140

141-
case other
141+
case other_tree
142142
when Rugged::Commit
143-
diff_tree_to_tree repo, _self, other.tree, options
143+
diff_tree_to_tree repo, tree, other_tree.tree, options
144144
when Rugged::Tree
145-
diff_tree_to_tree repo, _self, other, options
145+
diff_tree_to_tree repo, tree, other_tree, options
146146
when Rugged::Index
147-
diff_tree_to_index repo, _self, other, options
147+
diff_tree_to_index repo, tree, other_tree, options
148148
else
149149
raise TypeError, "A Rugged::Commit, Rugged::Tree or Rugged::Index instance is required"
150150
end

0 commit comments

Comments
 (0)