Skip to content

Commit

Permalink
Define default remote for repository at "gerrit.default-remote"
Browse files Browse the repository at this point in the history
  • Loading branch information
harman-cmccandless committed Sep 25, 2017
1 parent cc34685 commit c562bb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ cli.config = function(name, options) {

}
else {

if (!git.config("gerrit.default-remote")) {
git.config("gerrit.default-remote", "origin");
}

name = name || "default";

Expand Down
2 changes: 1 addition & 1 deletion lib/gerrit.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gerrit.GerritError = GerritError;

gerrit.parseRemote = function(remote) {

remote = remote || "origin";
remote = remote || git.config("gerrit.default-remote") || "origin";

return requireInRepo()
.then(function() {
Expand Down

0 comments on commit c562bb4

Please sign in to comment.