mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-07 21:24:26 +02:00
PR #195 bit of style cleanup and error handling and test for error handling
This commit is contained in:
parent
67413c42b6
commit
2423646199
3 changed files with 11 additions and 3 deletions
|
@ -240,5 +240,12 @@ describe('Git', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('will throw error if bad commits given to interactive test', function() {
|
||||||
|
expectTreeAsync(
|
||||||
|
'gc; git rebase HEAD~2 -i --interactive-test C2,C100; gc',
|
||||||
|
'{"branches":{"master":{"target":"C3","id":"master","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"}},"tags":{},"HEAD":{"target":"master","id":"HEAD"}}'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -590,8 +590,7 @@ var commandConfig = {
|
||||||
interactiveTest: commandOptions['--interactive-test']
|
interactiveTest: commandOptions['--interactive-test']
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
engine.rebaseInteractive(
|
engine.rebaseInteractive(
|
||||||
args[0],
|
args[0],
|
||||||
args[1], {
|
args[1], {
|
||||||
|
|
|
@ -2139,7 +2139,9 @@ GitEngine.prototype.rebaseInteractiveTest = function(targetSource, currentLocati
|
||||||
});
|
});
|
||||||
|
|
||||||
if (extraCommits.length > 0) {
|
if (extraCommits.length > 0) {
|
||||||
// What to do here?
|
throw new GitError({
|
||||||
|
msg: intl.todo('Hey those commits dont exist in the set!')
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue