Skip to content

Commit

Permalink
Review #239 - Consistent spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanj committed Sep 20, 2013
1 parent 1c3fb8d commit 60b6edd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Classes/git/PBGitSVStashItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

@interface PBGitSVStashItem : PBSourceViewItem

+ (id) itemWithStash:(PBGitStash*)stash;
+ (id)itemWithStash:(PBGitStash *)stash;

@property (nonatomic, strong) PBGitStash* stash;
@property (nonatomic, strong) PBGitStash *stash;

@end
7 changes: 4 additions & 3 deletions Classes/git/PBGitSVStashItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ @implementation PBGitSVStashItem

+ (id)itemWithStash:(PBGitStash *)stash
{
NSString * title = [NSString stringWithFormat:@"@{%zd}: %@", stash.index, stash.message];
PBGitSVStashItem * item = [self itemWithTitle:title];
NSString *title = [NSString stringWithFormat:@"@{%zd}: %@", stash.index, stash.message];
PBGitSVStashItem *item = [self itemWithTitle:title];
item.stash = stash;
item.revSpecifier = [[PBGitRevSpecifier alloc] initWithRef:stash.ref];
return item;
}

-(PBGitRef *)ref {
-(PBGitRef *)ref
{
return self.stash.ref;
}

Expand Down
10 changes: 5 additions & 5 deletions Classes/git/PBGitStash.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

@interface PBGitStash : NSObject
@property (nonatomic, readonly) size_t index;
@property (nonatomic, readonly) PBGitCommit * commit;
@property (nonatomic, readonly) NSString* message;
@property (nonatomic, readonly) PBGitRef* ref;
@property (nonatomic, readonly) PBGitCommit *commit;
@property (nonatomic, readonly) NSString *message;
@property (nonatomic, readonly) PBGitRef *ref;

@property (nonatomic, readonly) PBGitCommit * indexCommit;
@property (nonatomic, readonly) PBGitCommit * ancesterCommit;
@property (nonatomic, readonly) PBGitCommit *indexCommit;
@property (nonatomic, readonly) PBGitCommit *ancesterCommit;

- (id) initWithRepository:(PBGitRepository *)repo stashOID:(git_oid)stash_id index:(size_t)index message:(NSString *)message;

Expand Down
14 changes: 7 additions & 7 deletions Classes/git/PBGitStash.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ -(id)initWithRepository:(PBGitRepository *)repo stashOID:(git_oid)stash_id index
_index = index;
_message = message;

GTRepository * gtRepo = repo.gtRepo;
NSError * error = nil;
GTRepository *gtRepo = repo.gtRepo;
NSError *error = nil;
GTOID *stashOid = [GTOID oidWithGitOid:&stash_id];
GTCommit * gtCommit = (GTCommit *)[gtRepo lookupObjectByOID:stashOid objectType:GTObjectTypeCommit error:&error];
NSArray * parents = [gtCommit parents];
GTCommit * gtIndexCommit = [parents objectAtIndex:1];
GTCommit * gtAncestorCommit = [parents objectAtIndex:0];
GTCommit *gtCommit = (GTCommit *)[gtRepo lookupObjectByOID:stashOid objectType:GTObjectTypeCommit error:&error];
NSArray *parents = [gtCommit parents];
GTCommit *gtIndexCommit = [parents objectAtIndex:1];
GTCommit *gtAncestorCommit = [parents objectAtIndex:0];

_commit = [[PBGitCommit alloc] initWithRepository:repo andCommit:gtCommit];
_indexCommit = [[PBGitCommit alloc] initWithRepository:repo andCommit:gtIndexCommit];
Expand All @@ -52,7 +52,7 @@ -(NSString *)description

-(PBGitRef *)ref
{
NSString * refStr = [NSString stringWithFormat:@"refs/stash@{%zd}", _index];
NSString *refStr = [NSString stringWithFormat:@"refs/stash@{%zd}", _index];
return [[PBGitRef alloc] initWithString:refStr];
}

Expand Down

0 comments on commit 60b6edd

Please sign in to comment.