From e88539bd08a0af7d062392cb914880411cbb81cc Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sat, 20 Oct 2012 18:54:11 -0700 Subject: [PATCH] bug fix for rebasing --- src/git.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/git.js b/src/git.js index 5e790185..471271eb 100644 --- a/src/git.js +++ b/src/git.js @@ -727,6 +727,13 @@ GitEngine.prototype.rebaseStarter = function() { }; GitEngine.prototype.rebase = function(targetSource, currentLocation) { + var targetObj = this.resolveID(targetSource); + if (targetObj.get('type') !== 'branch') { + throw new GitError({ + msg: 'Only rebase onto branches! Not individual commits' + }); + } + // first some conditions if (this.isUpstreamOf(targetSource, currentLocation)) { throw new CommandResult({