Package git4idea

Examples of git4idea.GitLocalBranch


    public ArrayList<String> getLocalBranchNames(){
        ArrayList<GitLocalBranch> localBranches = new ArrayList<GitLocalBranch>(repo.getBranches().getLocalBranches());
        ArrayList<String> branchNameList = new ArrayList<String>();

        for(Iterator<GitLocalBranch> i = localBranches.iterator(); i.hasNext(); ) {
            GitLocalBranch branch = i.next();
            branchNameList.add(branch.getName());
        }

        return branchNameList;
    }
View Full Code Here


        Optional<GitRepository> gitRepositoryOptional = gerritGitUtil.getRepositoryForGerritProject(project, changeInfo.project);
        if (!gitRepositoryOptional.isPresent()) return;
        GitRepository gitRepository = gitRepositoryOptional.get();

        final String branchName = "FETCH_HEAD";
        GitLocalBranch currentBranch = gitRepository.getCurrentBranch();
        final String currentBranchName;
        if (currentBranch != null) {
            currentBranchName = currentBranch.getFullName();
        } else {
            currentBranchName = gitRepository.getCurrentRevision();
        }
        assert currentBranch != null : "Current branch is neither a named branch nor a revision";
View Full Code Here

TOP

Related Classes of git4idea.GitLocalBranch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.