From 9446b1dfc928121b7db7a1947b22bc68ea82571e Mon Sep 17 00:00:00 2001 From: John Haley Date: Sat, 7 Mar 2015 14:17:49 -0700 Subject: [PATCH 1/2] Add defaults to `Remote.prototype.push` Instead of forcing the user to pass in a signature and message each time they call push we can derive a good default for them. --- lib/remote.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/remote.js b/lib/remote.js index e97e4f39c..298958c34 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -35,6 +35,8 @@ Remote.prototype.setCallbacks = function(callbacks) { */ Remote.prototype.push = function(refSpecs, options, signature, message) { options = normalizeOptions(options, NodeGit.PushOptions); + signature = signature || this.owner().defaultSignature(); + message = message || 'Push to ' + this.name(); return push.call(this, refSpecs, options, signature, message); }; From ce50a6344e2e63588d02d54ae03afe51ca6e46a7 Mon Sep 17 00:00:00 2001 From: John Haley Date: Sat, 7 Mar 2015 14:25:24 -0700 Subject: [PATCH 2/2] Fix double-quote linter issue --- lib/remote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remote.js b/lib/remote.js index 298958c34..e6e242ccf 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -36,7 +36,7 @@ Remote.prototype.setCallbacks = function(callbacks) { Remote.prototype.push = function(refSpecs, options, signature, message) { options = normalizeOptions(options, NodeGit.PushOptions); signature = signature || this.owner().defaultSignature(); - message = message || 'Push to ' + this.name(); + message = message || "Push to " + this.name(); return push.call(this, refSpecs, options, signature, message); };