@@ -84,43 +84,43 @@ - (void)commitDetailsLoaded:(NSNotification *)notification
84
84
return ;
85
85
86
86
87
- NSMutableString *refs= [NSMutableString string ];
88
- NSArray *refsA= [historyController.webCommit refs ];
89
- NSString *currentRef= [[[historyController repository ] headRef ] simpleRef ];
90
- NSString *style= @" " ;
87
+ NSMutableString *refs = [NSMutableString string ];
88
+ NSArray *refsA = [historyController.webCommit refs ];
89
+ NSString *currentRef = [[[historyController repository ] headRef ] simpleRef ];
90
+ NSString *style = @" " ;
91
91
for (PBGitRef *ref in refsA){
92
92
if ([currentRef isEqualToString: [ref ref ]]){
93
- style= [NSString stringWithFormat: @" currentBranch refs %@ " ,[ref type ]];
93
+ style = [NSString stringWithFormat: @" currentBranch refs %@ " ,[ref type ]];
94
94
}else {
95
- style= [NSString stringWithFormat: @" refs %@ " ,[ref type ]];
95
+ style = [NSString stringWithFormat: @" refs %@ " ,[ref type ]];
96
96
}
97
97
[refs appendString: [NSString stringWithFormat: @" <span class='%@ '>%@ </span>" ,style,[ref shortName ]]];
98
98
}
99
99
100
100
// Header
101
- NSString *header= [self parseHeader: details withRefs: refs];
101
+ NSString *header = [self parseHeader: details withRefs: refs];
102
102
103
103
// File Stats
104
- NSMutableDictionary *stats= [self parseStats: details];
104
+ NSMutableDictionary *stats = [self parseStats: details];
105
105
106
106
// File list
107
- NSString *dt= [repository outputInWorkdirForArguments: [NSArray arrayWithObjects: @" diff-tree" , @" --root" , @" -r" , @" -C90%" , @" -M90%" , currentSha, nil ]];
108
- NSString *fileList= [GLFileView parseDiffTree: dt withStats: stats];
107
+ NSString *dt = [repository outputInWorkdirForArguments: [NSArray arrayWithObjects: @" diff-tree" , @" --root" , @" -r" , @" -C90%" , @" -M90%" , currentSha, nil ]];
108
+ NSString *fileList = [GLFileView parseDiffTree: dt withStats: stats];
109
109
110
110
// Diffs list
111
- NSString *d= [repository outputInWorkdirForArguments: [NSArray arrayWithObjects: @" diff-tree" , @" --root" , @" --cc" , @" -C90%" , @" -M90%" , currentSha, nil ]];
112
- NSString *diffs= [GLFileView parseDiff: d];
111
+ NSString *d = [repository outputInWorkdirForArguments: [NSArray arrayWithObjects: @" diff-tree" , @" --root" , @" --cc" , @" -C90%" , @" -M90%" , currentSha, nil ]];
112
+ NSString *diffs = [GLFileView parseDiff: d];
113
113
114
- NSString *html= [NSString stringWithFormat: @" %@%@ <div id='diffs'>%@ </div>" ,header,fileList,diffs];
114
+ NSString *html = [NSString stringWithFormat: @" %@%@ <div id='diffs'>%@ </div>" ,header,fileList,diffs];
115
115
116
- html= [html stringByReplacingOccurrencesOfString: @" {SHA_PREV}" withString: [NSString stringWithFormat: @" %@ ^" ,currentSha]];
117
- html= [html stringByReplacingOccurrencesOfString: @" {SHA}" withString: currentSha];
116
+ html = [html stringByReplacingOccurrencesOfString: @" {SHA_PREV}" withString: [NSString stringWithFormat: @" %@ ^" ,currentSha]];
117
+ html = [html stringByReplacingOccurrencesOfString: @" {SHA}" withString: currentSha];
118
118
119
119
[[view windowScriptObject ] callWebScriptMethod: @" showCommit" withArguments: [NSArray arrayWithObject: html]];
120
120
121
121
#ifdef DEBUG_BUILD
122
- NSString *dom= [(DOMHTMLElement *)[[[view mainFrame ] DOMDocument ] documentElement ] outerHTML ];
123
- NSString *tmpFile= @" ~/tmp/test2.html" ;
122
+ NSString *dom = [(DOMHTMLElement *)[[[view mainFrame ] DOMDocument ] documentElement ] outerHTML ];
123
+ NSString *tmpFile = @" ~/tmp/test2.html" ;
124
124
[dom writeToFile: [tmpFile stringByExpandingTildeInPath ] atomically: true encoding: NSUTF8StringEncoding error: nil ];
125
125
#endif
126
126
}
0 commit comments