diff options
Diffstat (limited to 'plugins/git4idea/src/git4idea/repo/GitRepositoryImpl.java')
-rw-r--r-- | plugins/git4idea/src/git4idea/repo/GitRepositoryImpl.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/git4idea/src/git4idea/repo/GitRepositoryImpl.java b/plugins/git4idea/src/git4idea/repo/GitRepositoryImpl.java index 1444f44c0288..30951670e079 100644 --- a/plugins/git4idea/src/git4idea/repo/GitRepositoryImpl.java +++ b/plugins/git4idea/src/git4idea/repo/GitRepositoryImpl.java @@ -139,6 +139,13 @@ public class GitRepositoryImpl extends RepositoryImpl implements GitRepository { @Nullable @Override + public String getCurrentBranchName() { + GitLocalBranch currentBranch = getCurrentBranch(); + return currentBranch == null ? null : currentBranch.getName(); + } + + @Nullable + @Override public AbstractVcs getVcs() { return GitVcs.getInstance(getProject()); } @@ -235,5 +242,4 @@ public class GitRepositoryImpl extends RepositoryImpl implements GitRepository { myBranches = branches; } } - } |