Add error handling for unexpected object types
authorChristian Johansen <christian@gitorious.com>
Mon, 17 Sep 2012 13:31:56 +0000 (15:31 +0200)
committerChristian Johansen <christian@gitorious.com>
Mon, 17 Sep 2012 13:31:56 +0000 (15:31 +0200)
commit26fd6a1039774bd9171e5a7a97ad95d22afc65b2
tree395b8105271b5cb87a4d9aced527a0d389d5df03
parentfd6bbb69c718763a337b556c3c0be164147ec18c
Add error handling for unexpected object types

  - Redirect blob -> tree for tree objects on /*/blob/*
  - Redirect tree -> blob for blob objects /*/tree/*
  - Consider it an error if attempting to Git::Shell#show a tree
lib/dolt/git/error.rb [new file with mode: 0644]
lib/dolt/git/shell.rb
lib/dolt/git/tree.rb
lib/dolt/sinatra/actions.rb
lib/dolt/sinatra/multi_repo_browser.rb
lib/dolt/sinatra/single_repo_browser.rb
test/dolt/git/shell_test.rb
test/dolt/git/tree_test.rb