Implement rev-list

This commit introduces the RevisionRange, which more closely follows real git
in terms of identifying a range of revisions than the current implementation of
log. RevisionRange is being used in the new rev-list command first because it
is easy to test for ordering. A future commit will replace the existing
implementation of log with RevisionRange.
This commit is contained in:
David Nelson 2019-04-18 20:57:06 -05:00
parent 6e5d6a64e9
commit 8529a3aac7
3 changed files with 128 additions and 0 deletions

View file

@ -574,6 +574,18 @@ var commandConfig = {
}
},
revlist: {
dontCountForGolf: true,
displayName: 'rev-list',
regex: /^git +rev-list($|\s)/,
execute: function(engine, command) {
var generalArgs = command.getGeneralArgs();
command.validateArgBounds(generalArgs, 1);
engine.revlist(generalArgs);
}
},
log: {
dontCountForGolf: true,
regex: /^git +log($|\s)/,