Skip to content

Commit d26a175

Browse files
committed
make the Ruby version look more like the C version did
1 parent 0820b62 commit d26a175

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/rugged/index.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,10 @@ def diff(*args)
109109
else
110110
if other.is_a? ::Rugged::Commit
111111
diff_tree_to_index other.tree, options
112+
elsif other.is_a? ::Rugged::Tree
113+
diff_tree_to_index other, options
112114
else
113-
if other.is_a? ::Rugged::Tree
114-
diff_tree_to_index other, options
115-
else
116-
raise TypeError, "A Rugged::Commit or Rugged::Tree instance is required"
117-
end
115+
raise TypeError, "A Rugged::Commit or Rugged::Tree instance is required"
118116
end
119117
end
120118
end

0 commit comments

Comments
 (0)