mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
Resolves #385 -- validate no amend options
This commit is contained in:
parent
422e61c93c
commit
02a69e85c0
1 changed files with 7 additions and 2 deletions
|
@ -153,8 +153,13 @@ var commandConfig = {
|
||||||
msg = args[0];
|
msg = args[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (commandOptions['--amend']) {
|
||||||
|
args = commandOptions['--amend'];
|
||||||
|
command.validateArgBounds(args, 0, 0, '--amend');
|
||||||
|
}
|
||||||
|
|
||||||
var newCommit = engine.commit({
|
var newCommit = engine.commit({
|
||||||
isAmend: commandOptions['--amend']
|
isAmend: !!commandOptions['--amend']
|
||||||
});
|
});
|
||||||
if (msg) {
|
if (msg) {
|
||||||
msg = msg
|
msg = msg
|
||||||
|
@ -267,7 +272,7 @@ var commandConfig = {
|
||||||
engine.pull({
|
engine.pull({
|
||||||
source: source,
|
source: source,
|
||||||
destination: destination,
|
destination: destination,
|
||||||
isRebase: commandOptions['--rebase']
|
isRebase: !!commandOptions['--rebase']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue