def current
      lines = @repo.git_output(['symbolic-ref', 'HEAD'], :raise_on_failure => false).lines

      if lines.size == 1
        line = lines.first.strip
        if (match = HEAD_REF.match(line))
          @branches.detect { |b| b.fullname == match[1] }
        elsif line == NO_HEAD_REF
          nil
        end
      else
        raise GitError, "Unexpected output from 'git symbolic-ref'; need 1 lines, got #{lines.size}"
      end
    end
def current
      lines = @repo.git_output(['symbolic-ref', 'HEAD'], :raise_on_failure => false).lines

      if lines.size == 1
        line = lines.first.strip
        if (match = HEAD_REF.match(line))
          @branches.detect { |b| b.fullname == match[1] }
        elsif line == NO_HEAD_REF
          nil
        end
      else
        raise GitError, "Unexpected output from 'git symbolic-ref'; need 1 lines, got #{lines.size}"
      end
    end
Return a Branch object representing whichever branch is currently checked out, IF AND ONLY IF
 that branch is a member of the collection. If the current branch isn't part of the collection
 or HEAD refers to something other than a branch, return nil.

 @return [Branch] the current branch if any, nil otherwise