mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
gah was forgetting origin assert
This commit is contained in:
parent
1e5181689d
commit
55d563a9bc
5 changed files with 86 additions and 19 deletions
|
@ -72,6 +72,9 @@ var assertIsRemoteBranch = function(engine, ref) {
|
|||
};
|
||||
|
||||
var assertOriginSpecified = function(generalArgs) {
|
||||
if (!generalArgs.length) {
|
||||
return;
|
||||
}
|
||||
if (generalArgs[0] !== 'origin') {
|
||||
throw new GitError({
|
||||
msg: intl.todo(
|
||||
|
@ -208,7 +211,7 @@ var commandConfig = {
|
|||
|
||||
var commandOptions = command.getOptionsMap();
|
||||
var generalArgs = command.getGeneralArgs();
|
||||
command.twoArgsImpliedOrigin(generalArgs);
|
||||
command.twoArgsForOrigin(generalArgs);
|
||||
assertOriginSpecified(generalArgs);
|
||||
// here is the deal -- git pull is pretty complex with
|
||||
// the arguments it wants. You can
|
||||
|
@ -331,7 +334,7 @@ var commandConfig = {
|
|||
var source;
|
||||
var destination;
|
||||
var generalArgs = command.getGeneralArgs();
|
||||
command.twoArgsImpliedOrigin(generalArgs);
|
||||
command.twoArgsForOrigin(generalArgs);
|
||||
assertOriginSpecified(generalArgs);
|
||||
|
||||
var firstArg = generalArgs[1];
|
||||
|
@ -677,7 +680,7 @@ var commandConfig = {
|
|||
// git push is pretty complex in terms of
|
||||
// the arguments it wants as well... get ready!
|
||||
var generalArgs = command.getGeneralArgs();
|
||||
command.twoArgsImpliedOrigin(generalArgs);
|
||||
command.twoArgsForOrigin(generalArgs);
|
||||
assertOriginSpecified(generalArgs);
|
||||
|
||||
var firstArg = generalArgs[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue