Add #getUpstreamBranch to Git

This commit is contained in:
Jason Rudolph
2013-08-31 09:18:28 -04:00
parent 4cc553daf8
commit 9f823040f2

View File

@@ -217,6 +217,17 @@ class Git
# Public: Returns the origin url of the repository.
getOriginUrl: -> @getConfigValue('remote.origin.url')
# Public: Returns the upstream branch for the current HEAD, or null if there
# is no upstream branch for the current HEAD.
#
# Examples
#
# getUpstreamBranch()
# # => "refs/remotes/origin/master"
#
# Returns a String.
getUpstreamBranch: -> @getRepo().getUpstreamBranch()
# Public: ?
getReferenceTarget: (reference) -> @getRepo().getReferenceTarget(reference)