mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge pull request #780 from atom/add-get-upstream-branch-to-git
Add #getUpstreamBranch to Git
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user