Returns the name of the current branch

@return  string
186529
public function getCurrentBranch()
    {
        /** @var $result CallResult */
        $result = $this->getGit()->{'rev-parse'}($this->getRepositoryPath(), array(
            '--symbolic-full-name',
            '--abbrev-ref',
            'HEAD'
        ));
        $result->assertSuccess(
            sprintf('Cannot retrieve current branch from "%s"', $this->getRepositoryPath())
        );

        return $result->getStdOut();
    }
908576
public function get_current_branch( $repo ) {
		$current_branch = ! empty( $this->cache['current_branch'] )
			? $this->cache['current_branch']
			: $repo->branch;

		return $current_branch;
	}
1179483
public function getName()
    {
        if ($this->isClosure()) {
            return '{closure}';
        }
        if (isset($this->node->namespacedName)) {
            return $this->node->namespacedName;
        }
        return $this->node->name;
    }
290090
public function getReferenceName()
    {
        $options = $this->getOptions();
        if (!empty($options['tag'])) {
            return 'Tag: ' . $options['tag'];
        } elseif (!empty($options['branch'])) {
            return 'Branch: ' . $options['branch'];
        } elseif (!empty($options['sha1'])) {
            return 'Sha1: ' . $options['sha1'];
        }
        return '';
    }
48914
public function getBranches()
    {
        $branches = array();

        $xml = $this->execute('branch');

        foreach ($xml->branch as $xmlBranch) {
            $branch = new BranchSummary;
            $branch->setName(self::normalise($xmlBranch->name, 'string'));
            $branch->setFirmId(self::normalise($xmlBranch->firmid, 'int'));
            $branch->setBranchId(self::normalise($xmlBranch->branchid, 'int'));
            $branch->setUrl(self::normalise($xmlBranch->url, 'string'));
            $branches[] = $branch;
        }

        return $branches;
    }
975198
public function getName()
	{
		$strName = parent::getName();
		if (empty($strName)) {
			$strName = $this->__name = $this->__generateName();
		}

		return $strName;
	}
1122806
public function getTitle()
    {
        // If customised, use the customised title
        if ($this->failover && ($title = $this->failover->Title)) {
            return $title;
        }
        // fallback to using base name
        return $this->getBasename();
    }
1181643
public function getCurrentStepName()
    {
        if ('' == $this->getModel()->getWorkflowStepName() || is_null($this->getModel()->getWorkflowStepName())) {
            $this->getModel()->setWorkflowStepName($this->getDefaultStepName());
        }

        return $this->getModel()->getWorkflowStepName();
    }
24711
public function getPath()
    {
        $stack = array($this->getName());
        $current = $this;

        while ($parent = $current->getParent()) {
            array_unshift($stack, $parent->getName());
            $current = $parent;
        }

        return implode('/', $stack);
    }
76154
protected function getRepositoryBranch()
    {
        // If we passed a branch, use it
        if ($branch = $this->getOption('branch')) {
            return $branch;
        }

        // Get branch from config, else compute the fallback
        $branch = $this->config->getContextually('vcs.branch');
        if (!$branch) {
            $fallback = $this->bash->on('local', function () {
                return $this->vcs->runSilently('currentBranch');
            });

            $fallback = $fallback ?: 'master';
            $branch = trim($fallback);
        }

        return $branch;
    }
25289
public function getName()
    {
        $this->doNaming();

        if ($this->table && $database = $this->table->getDatabase()) {
            return substr($this->name, 0, $database->getMaxColumnNameLength());
        }

        return $this->name;
    }
127658
public function current()
    {
        // the logic here avoids redoing the same work in all iterations

        if (null === $subPathname = $this->subPath) {
            $subPathname = $this->subPath = (string) $this->getSubPath();
        }
        if ('' !== $subPathname) {
            $subPathname .= $this->directorySeparator;
        }
        $subPathname .= $this->getFilename();

        return new SplFileInfo($this->rootPath.$this->directorySeparator.$subPathname, $this->subPath, $subPathname);
    }
714932
public function getName()
    {
        if ($this->_name === null) {
            $endpoint = namespaceSplit(get_class($this));
            $endpoint = substr(end($endpoint), 0, -8);

            $inflectMethod = $this->getInflectionMethod();
            $this->_name = Inflector::$inflectMethod($endpoint);
        }

        return $this->_name;
    }
379925
public function getName()
    {
        $name = $this->reflection->getName();

        if (strpos($name, '{closure}') !== false)
        {
            return null;
        }

        return $name;
    }
1317063
public function getName()
    {
        if (!$this->_name) {
            $class = Type::short($this);
            $this->_name = Helper::rtrimWord(Type::snake_case($class, '-'), '-type');
        }

        return $this->_name;

    }
489278
def current_branch(self):
        """"""
        output = self.context.capture('git', 'rev-parse', '--abbrev-ref', 'HEAD', check=False, silent=True)
        return output if output != 'HEAD' else None
378228
protected function getCurrentGroupName()
    {
        if (!$this->currentGroup) {
            $this->with($this->admin->getLabel(), ['auto_created' => true]);
        }

        return $this->currentGroup;
    }