Skip to content

Commit

Permalink
Slightly more explicit exit 0 for exists
Browse files Browse the repository at this point in the history
  • Loading branch information
stouset committed May 30, 2008
1 parent 982a2ee commit bc5268c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/rgit/cat-file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ def main(*ids)
# need to exit 1 if the object couldn't be found
object = Git::Object.find(id) rescue exit(1)

case mode
when :type then puts object.type
when :size then puts object.dump.length
when :exists then nil
when :print then puts object
puts case mode
when :type then object.type
when :size then object.dump.length
when :exists then exit(0) # do this explicitly
when :print then object
end
end

Expand Down

0 comments on commit bc5268c

Please sign in to comment.