quick implementation of git status

This commit is contained in:
Peter Cottle 2012-10-20 18:12:37 -07:00
parent b944a23790
commit 51a92227c3
4 changed files with 30 additions and 1 deletions

View file

@ -1091,6 +1091,30 @@ GitEngine.prototype.show = function(ref) {
});
};
GitEngine.prototype.statusStarter = function() {
var lines = [];
if (this.getDetachedHead()) {
lines.push('Detached Head!');
} else {
var branchName = this.HEAD.get('target').get('id');
lines.push('On branch ' + branchName);
}
lines.push('Changes to be committed:');
lines.push('');
lines.push('    modified: cal/OskiCostume.stl');
lines.push('');
lines.push('Ready to commit! (as always in this demo)');
var msg = '';
_.each(lines, function(line) {
msg += '# ' + line + '\n';
});
throw new CommandResult({
msg: msg
});
};
GitEngine.prototype.logStarter = function() {
if (this.generalArgs.length > 1) {
throw new GitError({