Skip to content

Commit 302d1cf

Browse files
author
Ben Chatelain
committed
Explicit comparison to nil
1 parent 041586b commit 302d1cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ObjectiveGit/GTRepository+RemoteOperations.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ - (BOOL)pushBranches:(NSArray *)branches toRemote:(GTRemote *)remote withOptions
184184
BOOL success = NO;
185185
GTBranch *trackingBranch = [branch trackingBranchWithError:error success:&success];
186186

187-
if (success && trackingBranch) {
187+
if (success && trackingBranch != nil) {
188188
// Use remote branch short name from trackingBranch, which could be different
189189
// (e.g. refs/heads/master:refs/heads/my_master)
190190
remoteBranchReference = [NSString stringWithFormat:@"refs/heads/%@", trackingBranch.shortName];

0 commit comments

Comments
 (0)