original_string: protected function getTagFromBranch($branch)
      {
          $git  = new GitRepository($this->input->getArgument('git-dir'));
          $tag  = trim($git->describe()->tags()->always()->execute($branch));
          $hash = trim($git->revParse()->short(false)->execute($branch));
          return $hash !== $tag ? $tag : null;
      }
code: protected function getTagFromBranch($branch)
      {
          $git  = new GitRepository($this->input->getArgument('git-dir'));
          $tag  = trim($git->describe()->tags()->always()->execute($branch));
          $hash = trim($git->revParse()->short(false)->execute($branch));
          return $hash !== $tag ? $tag : null;
      }
code_tokens: protected function getTagFromBranch ( $ branch ) { $ git = new GitRepository ( $ this -> input -> getArgument ( 'git-dir' ) ) ; $ tag = trim ( $ git -> describe ( ) -> tags ( ) -> always ( ) -> execute ( $ branch ) ) ; $ hash = trim ( $ git -> revParse ( ) -> short ( false ) -> execute ( $ branch ) ) ; return $ hash !== $ tag ? $ tag : null ; }
docstring: Retrieve the latest tag from a branch.
  
  @param string $branch The branch name to retrieve the tag from.
  
  @return null|string Returns null when no tag has been found, the tag name otherwise.
docstring_tokens: Retrieve the latest tag from a branch .