Skip to content

Commit 7d660e5

Browse files
committed
A nu name.
1 parent 9eb3981 commit 7d660e5

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

ObjectiveGit/GTRepository.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -565,19 +565,15 @@ NS_ASSUME_NONNULL_BEGIN
565565
/// Returns whether `ahead` and `behind` were successfully calculated.
566566
- (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind ofOID:(GTOID *)headOID relativeToOID:(GTOID *)baseOID error:(NSError **)error;
567567

568-
/// Creates an enumerator for walking the local commits in relative to the
569-
/// tracking branch.
568+
/// Creates an enumerator for walking the local commits beginning at one OID and
569+
/// ending at another. It will *not* include the commit for `endingOID`.
570570
///
571-
/// Note that this will only be accurate iff `trackingBranch` truly is
572-
/// `localBranch`s tracking branch. If you need more general functionality, see
573-
/// -[GTBranch uniqueCommitsRelativeToBranch:error:].
574-
///
575-
/// localBranch - The local branch.
576-
/// trackingBranch - `localBranch`s tracking branch.
577-
/// error - The error if one occurred.
571+
/// startingOID - The starting OID.
572+
/// endingOID - The ending OID.
573+
/// error - The error if one occurred.
578574
///
579575
/// Returns the enumerator or nil if an error occurred.
580-
- (nullable GTEnumerator *)enumerateLocalCommitsInBranch:(GTBranch *)localBranch trackingBranch:(GTBranch *)trackingBranch error:(NSError **)error;
576+
- (nullable GTEnumerator *)enumeratorForCommitsStartingAtOID:(GTOID *)startingOID endingAtOID:(GTOID *)endingOID error:(NSError **)error;
581577

582578
@end
583579

ObjectiveGit/GTRepository.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -912,17 +912,17 @@ - (BOOL)calculateAhead:(size_t *)ahead behind:(size_t *)behind ofOID:(GTOID *)he
912912
return YES;
913913
}
914914

915-
- (GTEnumerator *)enumerateLocalCommitsInBranch:(GTBranch *)localBranch trackingBranch:(GTBranch *)trackingBranch error:(NSError **)error {
916-
NSParameterAssert(localBranch != nil);
917-
NSParameterAssert(trackingBranch != nil);
915+
- (nullable GTEnumerator *)enumeratorForCommitsStartingAtOID:(GTOID *)startingOID endingAtOID:(GTOID *)endingOID error:(NSError **)error {
916+
NSParameterAssert(startingOID != nil);
917+
NSParameterAssert(endingOID != nil);
918918

919919
GTEnumerator *enumerator = [[GTEnumerator alloc] initWithRepository:self error:error];
920920
if (enumerator == nil) return nil;
921921

922-
BOOL success = [enumerator pushSHA:localBranch.OID.SHA error:error];
922+
BOOL success = [enumerator pushSHA:startingOID.SHA error:error];
923923
if (!success) return nil;
924924

925-
success = [enumerator hideSHA:trackingBranch.OID.SHA error:error];
925+
success = [enumerator hideSHA:endingOID.SHA error:error];
926926
if (!success) return nil;
927927

928928
return enumerator;

0 commit comments

Comments
 (0)