From d21a91a412ab24178c27eeff5eb234b897bc6bb8 Mon Sep 17 00:00:00 2001 From: joshaber Date: Thu, 3 Dec 2015 12:26:45 -0500 Subject: [PATCH] Added .getOriginalURL. --- src/git-repository-async.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/git-repository-async.js b/src/git-repository-async.js index e893bb9e5..f65156856 100644 --- a/src/git-repository-async.js +++ b/src/git-repository-async.js @@ -243,12 +243,15 @@ export default class GitRepositoryAsync { .catch(_ => null) } - // Public: Returns the origin url of the repository. + // Public: Get the URL for the 'origin' remote. // // * `path` (optional) {String} path in the repository to get this information // for, only needed if the repository has submodules. + // + // Returns a {Promise} which resolves to the {String} origin url of the + // repository. getOriginURL (_path) { - throw new Error('Unimplemented') + return this.getConfigValue('remote.origin.url', _path) } // Public: Returns the upstream branch for the current HEAD, or null if there