mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
making progress
This commit is contained in:
parent
c12e0c6f2d
commit
2a84ebe36d
8 changed files with 115 additions and 90 deletions
18
src/git.js
18
src/git.js
|
@ -1,7 +1,21 @@
|
|||
function Git() {
|
||||
function GitEngine() {
|
||||
this.detachedHead = false;
|
||||
}
|
||||
|
||||
Git.prototype.commit = function() {
|
||||
GitEngine.prototype.commit = function() {
|
||||
|
||||
};
|
||||
|
||||
var Commit = Backbone.Model.extend({
|
||||
initialize: function() {
|
||||
// validation / defaults
|
||||
if (!this.get('name')) {
|
||||
this.set('name', _.uniqueId('C'));
|
||||
}
|
||||
if (!this.get('parent') && !this.get('rootCommit')) {
|
||||
throw new Error('needs parent commit');
|
||||
}
|
||||
|
||||
// make a node and start drawing?
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue