Skip to content
Merged
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
9 changes: 1 addition & 8 deletions GitUpKit/Core/GCDiff.m
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,6 @@ - (GCDiff*)diffWorkingDirectoryWithCommit:(GCCommit*)commit
git_diff* diff2;
diffOptions->flags |= GIT_DIFF_UPDATE_INDEX;
status = git_diff_index_to_workdir(&diff2, self.private, index.private, diffOptions);
if (status == GIT_ELOCKED) {
status = GIT_OK; // Passing GIT_DIFF_UPDATE_INDEX means git_diff_index_to_workdir() may attempt to write the index and this could fail if it is currently locked by another process but that's OK to ignore this failure
}
if (status == GIT_OK) {
status = git_diff_merge(*outDiff, diff2);
if (status != GIT_OK) {
Expand Down Expand Up @@ -599,11 +596,7 @@ - (GCDiff*)diffWorkingDirectoryWithIndex:(GCIndex*)index
error:error
block:^int(git_diff** outDiff, git_diff_options* diffOptions) {
diffOptions->flags |= GIT_DIFF_UPDATE_INDEX;
int status = git_diff_index_to_workdir(outDiff, self.private, index.private, diffOptions);
if (status == GIT_ELOCKED) {
status = GIT_OK; // Passing GIT_DIFF_UPDATE_INDEX means git_diff_index_to_workdir() will attempt to write the index even if there are no changes and this could fail if it is currently locked by another process
}
return status;
return git_diff_index_to_workdir(outDiff, self.private, index.private, diffOptions);
}];
}

Expand Down
Loading