mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
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:
+2
-2
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user