@@ -123,7 +123,7 @@ - (NSString *)remoteName {
123123 return [[NSString alloc ] initWithData: data encoding: NSUTF8StringEncoding];
124124}
125125
126- - (GTCommit *)targetCommitWithError : (NSError **)error {
126+ - (GTCommit *)targetCommitWithError : (NSError * __autoreleasing *)error {
127127 GTOID *oid = self.OID ;
128128 if (oid == nil ) {
129129 if (error != NULL ) *error = GTReference.invalidReferenceError ;
@@ -133,7 +133,7 @@ - (GTCommit *)targetCommitWithError:(NSError **)error {
133133 return [self .repository lookUpObjectByOID: oid objectType: GTObjectTypeCommit error: error];
134134}
135135
136- - (NSUInteger )numberOfCommitsWithError : (NSError **)error {
136+ - (NSUInteger )numberOfCommitsWithError : (NSError * __autoreleasing *)error {
137137 GTEnumerator *enumerator = [[GTEnumerator alloc ] initWithRepository: self .repository error: error];
138138 if (enumerator == nil ) return NSNotFound ;
139139
@@ -160,14 +160,14 @@ - (BOOL)isHEAD {
160160 return (git_branch_is_head (self.reference .git_reference ) ? YES : NO );
161161}
162162
163- - (NSArray *)uniqueCommitsRelativeToBranch : (GTBranch *)otherBranch error : (NSError **)error {
163+ - (NSArray *)uniqueCommitsRelativeToBranch : (GTBranch *)otherBranch error : (NSError * __autoreleasing *)error {
164164 GTOID *oid = self.OID ;
165165 GTOID *otherOID = otherBranch.OID ;
166166 GTEnumerator *enumerator = [self .repository enumeratorForUniqueCommitsFromOID: oid relativeToOID: otherOID error: error];
167167 return [enumerator allObjectsWithError: error];
168168}
169169
170- - (BOOL )deleteWithError : (NSError **)error {
170+ - (BOOL )deleteWithError : (NSError * __autoreleasing *)error {
171171 int gitError = git_branch_delete (self.reference .git_reference );
172172 if (gitError != GIT_OK) {
173173 if (error != NULL ) *error = [NSError git_errorFor: gitError description: @" Failed to delete branch %@ " , self .name];
@@ -177,7 +177,7 @@ - (BOOL)deleteWithError:(NSError **)error {
177177 return YES ;
178178}
179179
180- - (BOOL )rename : (NSString *)name force : (BOOL )force error : (NSError **)error {
180+ - (BOOL )rename : (NSString *)name force : (BOOL )force error : (NSError * __autoreleasing *)error {
181181 git_reference *git_ref;
182182 int gitError = git_branch_move (&git_ref, self.reference .git_reference , name.UTF8String , (force ? 1 : 0 ));
183183 if (gitError != GIT_OK) {
@@ -192,7 +192,7 @@ - (BOOL)rename:(NSString *)name force:(BOOL)force error:(NSError **)error {
192192 return YES ;
193193}
194194
195- - (GTBranch *)trackingBranchWithError : (NSError **)error success : (BOOL *)success {
195+ - (GTBranch *)trackingBranchWithError : (NSError * __autoreleasing *)error success : (BOOL *)success {
196196 BOOL underSuccess = NO ;
197197 if (success == NULL ) {
198198 success = &underSuccess;
@@ -236,7 +236,7 @@ - (GTBranch *)trackingBranchWithError:(NSError **)error success:(BOOL *)success
236236 return [[self class ] branchWithReference: upsteamRef];
237237}
238238
239- - (BOOL )updateTrackingBranch : (GTBranch *)trackingBranch error : (NSError **)error {
239+ - (BOOL )updateTrackingBranch : (GTBranch *)trackingBranch error : (NSError * __autoreleasing *)error {
240240 int result = GIT_ENOTFOUND;
241241 if (trackingBranch.branchType == GTBranchTypeRemote) {
242242 result = git_branch_set_upstream (self.reference .git_reference , [trackingBranch.name stringByReplacingOccurrencesOfString: [GTBranch remoteNamePrefix ] withString: @" " ].UTF8String );
@@ -251,14 +251,14 @@ - (BOOL)updateTrackingBranch:(GTBranch *)trackingBranch error:(NSError **)error
251251 return YES ;
252252}
253253
254- - (GTBranch *)reloadedBranchWithError : (NSError **)error {
254+ - (GTBranch *)reloadedBranchWithError : (NSError * __autoreleasing *)error {
255255 GTReference *reloadedRef = [self .reference reloadedReferenceWithError: error];
256256 if (reloadedRef == nil ) return nil ;
257257
258258 return [[self .class alloc ] initWithReference: reloadedRef];
259259}
260260
261- - (BOOL )calculateAhead : (size_t *)ahead behind : (size_t *)behind relativeTo : (GTBranch *)branch error : (NSError **)error {
261+ - (BOOL )calculateAhead : (size_t *)ahead behind : (size_t *)behind relativeTo : (GTBranch *)branch error : (NSError * __autoreleasing *)error {
262262 GTOID *oid = self.OID ;
263263 GTOID *branchOID = branch.OID ;
264264 return [self .repository calculateAhead: ahead behind: behind ofOID: oid relativeToOID: branchOID error: error];
0 commit comments