Files
gitx/PBChangedFile.h
T
Pieter de Bie 5010511bdb CommitView: Always use a single PBChangedFile object
This makes sure we don't add a double object to our array,
if a file has both cached and unstaged changes.
2008-10-10 21:59:23 +02:00

38 lines
769 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;
__weak PBGitRepository *repository;
PBChangedFileStatus status;
}
@property (readonly) NSString *path;
@property (assign) PBChangedFileStatus status;
@property (assign) BOOL hasCachedChanges;
@property (assign) BOOL hasUnstagedChanges;
- (NSImage *)icon;
- (NSString *)changes;
- (void) stageChanges;
- (void) unstageChanges;
- (id) initWithPath:(NSString *)p andRepository:(PBGitRepository *)r;
@end