Implement a DetailsController

This controller makes sure that only the current view
receives its notifications. Therefore we won't do any work that we don't
see, like parsing diffs or asking for trees. This makes everything quicker.
This commit is contained in:
Pieter de Bie
2008-06-16 03:13:08 +02:00
parent d6a0b1bb4c
commit 6ba944b2ac
7 changed files with 1331 additions and 1265 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
var Commit = Class.create({
initialize: function(obj) {
this.raw = obj.details();
this.raw = obj.details;
var messageStart = this.raw.indexOf("\n\n") + 2;
var diffStart = this.raw.indexOf("\ndiff ");
this.header = this.raw.substring(0, messageStart);
this.sha = this.header.match(/^commit ([0-9a-f]{40,40})/)[1];