mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
8d729dae4c
We used to read in a completely new array when refreshing the index. The problem with this is that the selection changes when reading in the new array. We avoid this by changing the current array, rather than loading in a completely new one.
41 lines
807 B
Objective-C
41 lines
807 B
Objective-C
//
|
|
// PBChangedFile.h
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 22-09-08.
|
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
#import "PBGitRepository.h"
|
|
|
|
typedef enum {
|
|
NEW,
|
|
MODIFIED,
|
|
DELETED
|
|
} PBChangedFileStatus;
|
|
|
|
@interface PBChangedFile : NSObject {
|
|
NSString *path;
|
|
BOOL hasCachedChanges;
|
|
BOOL hasUnstagedChanges;
|
|
BOOL shouldBeDeleted;
|
|
|
|
// Index and HEAD stuff, to be used to revert changes
|
|
NSString *commitBlobSHA;
|
|
NSString *commitBlobMode;
|
|
|
|
PBChangedFileStatus status;
|
|
}
|
|
|
|
|
|
@property (copy) NSString *path, *commitBlobSHA, *commitBlobMode;
|
|
@property (assign) PBChangedFileStatus status;
|
|
@property (assign) BOOL hasCachedChanges, hasUnstagedChanges, shouldBeDeleted;
|
|
|
|
- (NSImage *)icon;
|
|
- (NSString *)indexInfo;
|
|
|
|
- (id) initWithPath:(NSString *)p;
|
|
@end
|