module GitSpelunk
Given a sha and a line_number in this sha, this module calculates the corresponding line number in sha's parent.
-
It uses git diff for the sha & its parent to get all the diff chunks.
-
It then calculates which chunk given line_number belongs to.
-
Once found the target chunk, it then goes to the sha's line_number in the diff
-
It then calculate parent's line number by ignoring changes for sha in the diff
git diff 6d405155..379120f — a/app/assets/javascripts/lib/user_assume/chat_extension.module.js +++ b/app/assets/javascripts/lib/user_assume/chat_extension.module.js @@ -1,7 +1,6 @@ -/*globals ChatLotus*/
module.exports = Em.Object.extend({
-
chatService: ChatLotus.Service,
-
hasChatEnabled: Em.computed.oneWay('chatService.hasChatEnabled'),
+ ChatService: ChatLotus.Service, + hasChatEnabled: Em.computed.oneWay('ChatService.hasChatEnabled'),
previousAvailablity: false, detach: function() {
@@ -19,10 +18,10 @@ module.exports = Em.Object.extend({
}, _isChatAvailable: function() {
-
return this.get('chatService.Availability.available');
+ return this.getPath('ChatService.Availability.available');
}, _toggleChatAvailability: function() {
-
this.get('chatService.Availability').toggleAvailability();
+ this.getPath('ChatService.Availability').toggleAvailability();
} });
Constants
- BlameLine
- VERSION