public function tree($ref = 'HEAD', $path = null)
    {
        if ($path instanceof NodeObject) {
            $subjectPath = $path->getFullPath() . ($path->isTree() ? '/' : '');
        }
        else {
            $subjectPath = $path;
        }

        $what = $ref;
        if ($ref instanceof TreeishInterface) {
            $what = $ref->getSha();
        }
        $this->clearAll();
        $this->addCommandName(self::LS_TREE_COMMAND);
        $this->addCommandArgument('-l');
        $subject = $what;
        $this->addCommandSubject($subject);
        $this->addPath($subjectPath);

        return $this->getCommand();
    }
public function tree($ref = 'HEAD', $path = null)
    {
        if ($path instanceof NodeObject) {
            $subjectPath = $path->getFullPath() . ($path->isTree() ? '/' : '');
        }
        else {
            $subjectPath = $path;
        }

        $what = $ref;
        if ($ref instanceof TreeishInterface) {
            $what = $ref->getSha();
        }
        $this->clearAll();
        $this->addCommandName(self::LS_TREE_COMMAND);
        $this->addCommandArgument('-l');
        $subject = $what;
        $this->addCommandSubject($subject);
        $this->addPath($subjectPath);

        return $this->getCommand();
    }
public function tree ( $ ref = 'HEAD' , $ path = null ) { if ( $ path instanceof NodeObject ) { $ subjectPath = $ path -> getFullPath ( ) . ( $ path -> isTree ( ) ? '/' : '' ) ; } else { $ subjectPath = $ path ; } $ what = $ ref ; if ( $ ref instanceof TreeishInterface ) { $ what = $ ref -> getSha ( ) ; } $ this -> clearAll ( ) ; $ this -> addCommandName ( self :: LS_TREE_COMMAND ) ; $ this -> addCommandArgument ( '-l' ) ; $ subject = $ what ; $ this -> addCommandSubject ( $ subject ) ; $ this -> addPath ( $ subjectPath ) ; return $ this -> getCommand ( ) ; }
tree of a given path

@param string            $ref  reference
@param string|NodeObject $path path

@throws \RuntimeException
@return string
tree of a given path