clockout
clockout copied to clipboard
Add an error message when "clocking" a directory without repository.
I've tried to clock a directory without an git repository and got
/Library/Ruby/Gems/2.0.0/gems/clockout-0.6/lib/clockout.rb:175:in `discover': Could not find repository from '/Users/xyz/Projects/abc' (Rugged::RepositoryError)
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/lib/clockout.rb:175:in `get_repo'
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/lib/clockout.rb:216:in `initialize'
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/bin/clock:217:in `new'
from /Library/Ruby/Gems/2.0.0/gems/clockout-0.6/bin/clock:217:in `<top (required)>'
from /usr/bin/clock:23:in `load'
from /usr/bin/clock:23:in `<main>'
since I didn't not that I'm in the wrong directory I wondered if this a bug first. Costed me some minutes to realize whats going on. It would be very nice to catch this exception and print an error message like
ERROR: No repository found in '/Users/xyz/Projects/abc'.
Thanks for making such great tool.