Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Classes/Controllers/PBWebHistoryController.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,19 @@ - (void) changeContentToCommit:(PBGitCommit *)commit
GTDiff *d = [GTDiff diffOldTree:commit.parents.firstObject.tree
withNewTree:commit.tree
inRepository:repo
options:@{
GTDiffFindOptionsFlagsKey : @(flags)
}
options:@{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the indentation really off here, or is this just a github artifact?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or are we laboring against tabs somehow :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub consider tabs to indent 8 instead of Xcode default of 4.

error:&err];

if (!d) {
NSLog(@"Commit summary diff error: %@", err);
return nil;
}

// Rewrite the diff to display moved files.
[d findSimilarWithOptions:@{GTDiffFindOptionsFlagsKey:@(flags)}];

if (isCanceled()) return nil;
NSMutableArray *fileDeltas = [NSMutableArray array];
NSMutableArray<NSDictionary<NSString *, NSObject *> *> *fileDeltas = [NSMutableArray array];
NSMutableString *fullDiff = [NSMutableString string];
[d enumerateDeltasUsingBlock:^(GTDiffDelta *_Nonnull delta, BOOL *_Nonnull stop) {
if (isCanceled()) {
Expand Down Expand Up @@ -234,8 +237,7 @@ - (void) changeContentToCommit:(PBGitCommit *)commit
@"newFileSize" : @(newFileSize),
@"numLinesAdded" : @(numLinesAdded),
@"numLinesRemoved" : @(numLinesRemoved),
@"binary" :
[NSNumber numberWithBool:(delta.flags & GTDiffFileFlagBinary) != 0],
@"binary" : [NSNumber numberWithBool:(delta.flags & GTDiffFileFlagBinary) != 0],
}];
}];
if (isCanceled()) return nil;
Expand Down
4 changes: 2 additions & 2 deletions Resources/html/views/history/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ var loadCommitDiff = function(jsonData)
fileElem.targetFileId = "file_index_"+i;

var displayName, representedFile;
if (fileInfo.changeType == "renamed") {
displayName = fileInfo.filename;
if (fileInfo.changeType === "renamed") {
displayName = formatRenameDiff(renameDiff(fileInfo.oldFilename, fileInfo.newFilename));
representedFile = fileInfo.newFilename;
}
else {
Expand Down