have basic command line history down

This commit is contained in:
Peter Cottle 2012-09-11 22:10:40 -07:00
parent 513315af3c
commit 9b62f06bc2
2 changed files with 47 additions and 6 deletions

View file

@ -104,11 +104,14 @@ GitEngine.prototype.commit = function() {
if (this.currentOptions['--amend']) {
targetCommit = this.resolveId('HEAD~1');
}
if (this.currentOptions['-a']) {
events.trigger('commandProcessWarn', 'No need to add files in this demo');
}
var newCommit = this.makeCommit(targetCommit);
if (this.getDetachedHead()) {
events.trigger('commandProcessWarn', "Warning!! Detached HEAD state");
events.trigger('commandProcessWarn', 'Warning!! Detached HEAD state');
} else {
var targetBranch = this.HEAD.get('target');
targetBranch.set('target', newCommit);