def validate_repo_clean
      @gitrepo = Grit::Repo.new(@repo_root)
      status = @gitrepo.status
      if !status.changed.nil? || status.changed.size != 0 # This has to be a convoluted way to determine a non-empty...
        # Test each for the magic sha_index. Ref: https://github.com/mojombo/grit/issues/142
        status.changed.each do |file|
          case file[1].sha_index
          when '0' * 40
            ui.error 'There seem to be unstaged changes in your repo. Either stash or add them.'
            exit 4
          else
            ui.msg 'There are modified files that have been staged, and will be included in the push.'
          end
        end
      elsif status.untracked.size > 0
        ui.warn 'There are untracked files in your repo. You might want to look into that.'
      end
    end
def validate_repo_clean
      @gitrepo = Grit::Repo.new(@repo_root)
      status = @gitrepo.status
      if !status.changed.nil? || status.changed.size != 0 # This has to be a convoluted way to determine a non-empty...
        # Test each for the magic sha_index. Ref: https://github.com/mojombo/grit/issues/142
        status.changed.each do |file|
          case file[1].sha_index
          when '0' * 40
            ui.error 'There seem to be unstaged changes in your repo. Either stash or add them.'
            exit 4
          else
            ui.msg 'There are modified files that have been staged, and will be included in the push.'
          end
        end
      elsif status.untracked.size > 0
        ui.warn 'There are untracked files in your repo. You might want to look into that.'
      end
    end
Inspect the cookbook directory's git status is good to push.
 Any existing tracked files should be staged, otherwise error & exit.
 Untracked files are warned about, but will allow continue.
 This needs more testing.