From 60b6eddc7210c1db75112e45b4424e73cd486cf1 Mon Sep 17 00:00:00 2001 From: Rowan James Date: Fri, 20 Sep 2013 23:08:31 +1000 Subject: [PATCH] Review #239 - Consistent spacing --- Classes/git/PBGitSVStashItem.h | 4 ++-- Classes/git/PBGitSVStashItem.m | 7 ++++--- Classes/git/PBGitStash.h | 10 +++++----- Classes/git/PBGitStash.m | 14 +++++++------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Classes/git/PBGitSVStashItem.h b/Classes/git/PBGitSVStashItem.h index 332a37a92..03f5e0056 100644 --- a/Classes/git/PBGitSVStashItem.h +++ b/Classes/git/PBGitSVStashItem.h @@ -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 diff --git a/Classes/git/PBGitSVStashItem.m b/Classes/git/PBGitSVStashItem.m index ccdd67829..f8d9c71c0 100644 --- a/Classes/git/PBGitSVStashItem.m +++ b/Classes/git/PBGitSVStashItem.m @@ -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; } diff --git a/Classes/git/PBGitStash.h b/Classes/git/PBGitStash.h index 55b112da8..246678941 100644 --- a/Classes/git/PBGitStash.h +++ b/Classes/git/PBGitStash.h @@ -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; diff --git a/Classes/git/PBGitStash.m b/Classes/git/PBGitStash.m index eae830f89..7a36c849f 100644 --- a/Classes/git/PBGitStash.m +++ b/Classes/git/PBGitStash.m @@ -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]; @@ -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]; }