Merge pull request #780 from atom/add-get-upstream-branch-to-git

Add #getUpstreamBranch to Git
This commit is contained in:
Jason Rudolph
2013-08-31 13:13:08 -07:00

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)