@@ -122,29 +122,29 @@ class Tree
122
122
# diff = tree.diff(other_tree)
123
123
#
124
124
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 )
127
127
raise TypeError , "At least a Rugged::Tree object is required for diffing"
128
128
end
129
129
130
- if other . nil?
131
- if _self . nil?
130
+ if other_tree . nil?
131
+ if tree . nil?
132
132
raise TypeError , "Need 'old' or 'new' for diffing"
133
133
else
134
- diff_tree_to_tree repo , _self , nil , options
134
+ diff_tree_to_tree repo , tree , nil , options
135
135
end
136
136
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
139
139
end
140
140
141
- case other
141
+ case other_tree
142
142
when Rugged ::Commit
143
- diff_tree_to_tree repo , _self , other . tree , options
143
+ diff_tree_to_tree repo , tree , other_tree . tree , options
144
144
when Rugged ::Tree
145
- diff_tree_to_tree repo , _self , other , options
145
+ diff_tree_to_tree repo , tree , other_tree , options
146
146
when Rugged ::Index
147
- diff_tree_to_index repo , _self , other , options
147
+ diff_tree_to_index repo , tree , other_tree , options
148
148
else
149
149
raise TypeError , "A Rugged::Commit, Rugged::Tree or Rugged::Index instance is required"
150
150
end
0 commit comments