Skip to content

Commit a64e915

Browse files
committed
Fix formatting and documentation
1 parent ec9dbda commit a64e915

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

ObjectiveGit/GTIndex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@
138138
/// Add an entry (with the provided data and name) to the index.
139139
/// Will fail if the receiver's repository is nil.
140140
///
141-
/// data - The content of the entry to add
142-
/// name - The name of the entry to add
141+
/// data - The content of the entry to add. Cannot be nil.
142+
/// name - The name of the entry to add. Cannot be nil.
143143
/// error - The error if one occurred.
144144
- (BOOL)addData:(NSData *)data withName:(NSString *)name error:(NSError **)error;
145145

ObjectiveGit/GTIndexEntry.m

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ @implementation GTIndexEntry
4545
#pragma mark NSObject
4646

4747
- (NSString *)description {
48-
return [NSString stringWithFormat:@"<%@: %p> path: %@", self.class, self, self.path];
48+
return [NSString stringWithFormat:@"<%@: %p> path: %@", self.class, self, self.path];
4949
}
5050

5151
#pragma mark Lifecycle
@@ -58,7 +58,7 @@ - (instancetype)initWithGitIndexEntry:(const git_index_entry *)entry index:(GTIn
5858

5959
_git_index_entry = entry;
6060
_index = index;
61-
61+
6262
return self;
6363
}
6464

@@ -92,7 +92,7 @@ - (GTIndexEntryStatus)status {
9292
} else if ((self.flags & GIT_IDXENTRY_REMOVE) != 0) {
9393
return GTIndexEntryStatusRemoved;
9494
}
95-
95+
9696
return GTIndexEntryStatusUpToDate;
9797
}
9898

@@ -119,21 +119,18 @@ + (instancetype)objectWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError *
119119
}
120120

121121
- (instancetype)initWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError **)error {
122-
123122
git_object *obj;
124123
int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_otype)GTObjectTypeAny);
125124

126125
if (gitError < GIT_OK) {
127126
if (error != NULL) {
128-
*error = [NSError git_errorFor:gitError description:@"Failed to get object for index entry."];
127+
*error = [NSError git_errorFor:gitError description:@"Failed to get object for index entry."];
129128
}
130129

131130
return nil;
132131
}
133132

134-
135-
return [self initWithObj:obj inRepository:indexEntry.repository];
133+
return [self initWithObj:obj inRepository:indexEntry.repository];
136134
}
137135

138136
@end
139-

0 commit comments

Comments
 (0)