@movitto another way to lay it out is to bury these checks in methods... you'd have to have a class though to keep state but maybe something like this:

```
attr_reader :distgit

def needs_repo?
  @distgit ||= Git::Pkg.new :name => name

  begin
    distgit.clone
  rescue
    true
  else
    false
  end
end

def state(args = {})
  return :needs_repo if needs_repo?

  return :needs_branch if distgit.valid_branches.empty?

  ....
end
```