mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
misc work
This commit is contained in:
parent
906216d98b
commit
1ed8a2524a
8 changed files with 350 additions and 13 deletions
|
@ -151,6 +151,25 @@ var commandConfig = {
|
|||
}
|
||||
},
|
||||
|
||||
remote: {
|
||||
regex: /^git +remote($|\s)/,
|
||||
options: [
|
||||
'-v'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
command.acceptNoGeneralArgs();
|
||||
if (!engine.hasOrigin()) {
|
||||
throw new CommandResult({
|
||||
msg: ''
|
||||
});
|
||||
}
|
||||
|
||||
engine.printRemotes({
|
||||
verbose: !!command.getOptionsMap()['-v']
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
fetch: {
|
||||
regex: /^git +fetch *?$/,
|
||||
execute: function(engine, command) {
|
||||
|
@ -159,7 +178,13 @@ var commandConfig = {
|
|||
msg: intl.str('git-error-origin-required')
|
||||
});
|
||||
}
|
||||
command.acceptNoGeneralArgs();
|
||||
var generalArgs = command.getGeneralArgs();
|
||||
command.oneArgImpliedOrigin(generalArgs);
|
||||
if (generalArgs[0] !== 'origin') {
|
||||
throw new GitError({
|
||||
msg: intl.str('git-error-options')
|
||||
});
|
||||
}
|
||||
engine.fetch();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue