Skip to content

Commit 76f1469

Browse files
heipeiPieter de Bie
authored andcommitted
PBGitCommitController: Fix unstaging of files
This fixes a simple error where a staged file was read and added with its mode/sha exchanged, and therefore its index-info could not be used by update-index. The error was introduced in a6b7c0c. This fixes ticket #159. Signed-off-by: Johannes Gilger <[email protected]>
1 parent a780ad9 commit 76f1469

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PBGitCommitController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ - (void) addFilesFromDictionary:(NSMutableDictionary *)dictionary staged:(BOOL)s
240240
file.status = MODIFIED;
241241

242242
if (staged) {
243-
file.commitBlobSHA = [[fileStatus objectAtIndex:0] substringFromIndex:1];
244-
file.commitBlobMode = [fileStatus objectAtIndex:2];
243+
file.commitBlobMode = [[fileStatus objectAtIndex:0] substringFromIndex:1];
244+
file.commitBlobSHA = [fileStatus objectAtIndex:2];
245245
}
246246

247247
file.hasStagedChanges = staged;

0 commit comments

Comments
 (0)