misc work

This commit is contained in:
Peter Cottle 2013-10-06 14:30:50 -07:00
parent 906216d98b
commit 1ed8a2524a
8 changed files with 350 additions and 13 deletions

View file

@ -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();
}
},