mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Also set blobMode / blobSha for unstaged changes.
It shouldn't matter if a file has staged / unstaged changes, as long as the file is tracked, the SHA and blob should be recorded. This had really annoying complications because PBChangedFile used this information to decide whether or not to delete a file from the index when unstaging in PBGitIndexController
This commit is contained in:
@@ -244,12 +244,12 @@
|
||||
if (tracked) {
|
||||
NSString *mode = [[fileStatus objectAtIndex:0] substringFromIndex:1];
|
||||
NSString *sha = [fileStatus objectAtIndex:2];
|
||||
file.commitBlobSHA = sha;
|
||||
file.commitBlobMode = mode;
|
||||
|
||||
if (staged) {
|
||||
if (staged)
|
||||
file.hasStagedChanges = YES;
|
||||
file.commitBlobSHA = sha;
|
||||
file.commitBlobMode = mode;
|
||||
} else
|
||||
else
|
||||
file.hasUnstagedChanges = YES;
|
||||
} else {
|
||||
// Untracked file, set status to NEW, only unstaged changes
|
||||
@@ -284,7 +284,7 @@
|
||||
else
|
||||
file.status = MODIFIED;
|
||||
|
||||
if (staged) {
|
||||
if (tracked) {
|
||||
file.commitBlobMode = [[fileStatus objectAtIndex:0] substringFromIndex:1];
|
||||
file.commitBlobSHA = [fileStatus objectAtIndex:2];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user