mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
quick implementation of git status
This commit is contained in:
parent
b944a23790
commit
51a92227c3
4 changed files with 30 additions and 1 deletions
|
@ -117,7 +117,8 @@ var Command = Backbone.Model.extend({
|
|||
revert: /^revert($|\s)/,
|
||||
log: /^log($|\s)/,
|
||||
merge: /^merge($|\s)/,
|
||||
show: /^show($|\s)/
|
||||
show: /^show($|\s)/,
|
||||
status: /^status($|\s)/
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -246,6 +247,7 @@ OptionParser.prototype.getMasterOptionMap = function() {
|
|||
'-am': false, // warning
|
||||
'-m': false
|
||||
},
|
||||
status: {},
|
||||
log: {},
|
||||
add: {},
|
||||
branch: {
|
||||
|
|
|
@ -299,6 +299,7 @@ var CommandLineHistoryView = Backbone.View.extend({
|
|||
}
|
||||
if (cD.clientHeight > t.clientHeight) {
|
||||
$(t).css('overflow-y', 'scroll');
|
||||
$(t).css('overflow-x', 'hidden');
|
||||
$(t).addClass('scrolling');
|
||||
t.scrollTop = t.scrollHeight;
|
||||
}
|
||||
|
|
24
src/git.js
24
src/git.js
|
@ -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({
|
||||
|
|
2
todo.txt
2
todo.txt
|
@ -5,10 +5,12 @@ Big things:
|
|||
|
||||
Big Graphic things:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- gitVisuals OVERHAUL. Will make the load / save tree easier
|
||||
|
||||
Medium things:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- Rebuilding trees from a JSON snapshot / blob. this should be easy... i think. if we remove the need for parents
|
||||
- gitEngine loads from tree immediately, not the weird thing we have now
|
||||
|
||||
Small things to implement:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue