diff --git a/.gitmodules b/.gitmodules index bad144f3c..9248e633f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,6 @@ [submodule "libgit2"] path = External/libgit2 url = https://github.com/libgit2/libgit2.git -[submodule "ObjectiveGitTests/specta"] - path = ObjectiveGitTests/specta - url = https://github.com/specta/specta.git -[submodule "ObjectiveGitTests/expecta"] - path = ObjectiveGitTests/expecta - url = https://github.com/specta/expecta.git [submodule "Configuration"] path = External/Configuration url = https://github.com/jspahrsummers/xcconfigs.git @@ -16,3 +10,6 @@ [submodule "libssh2"] path = External/libssh2 url = git://git.libssh2.org/libssh2.git +[submodule "External/Quick"] + path = External/Quick + url = https://github.com/github/Quick.git diff --git a/External/Configuration b/External/Configuration index bbb2bee4e..6c7a02a43 160000 --- a/External/Configuration +++ b/External/Configuration @@ -1 +1 @@ -Subproject commit bbb2bee4eb75fcc05357ed78621f3424f8588e8e +Subproject commit 6c7a02a43954c74d2be1d2fcf7bfd65a263e7c52 diff --git a/External/Quick b/External/Quick new file mode 160000 index 000000000..30395c676 --- /dev/null +++ b/External/Quick @@ -0,0 +1 @@ +Subproject commit 30395c676b9a7e4688160fd2af4c46a382149bef diff --git a/External/openssl b/External/openssl index 46ebd9e3b..872e681c0 160000 --- a/External/openssl +++ b/External/openssl @@ -1 +1 @@ -Subproject commit 46ebd9e3bb623d3c15ef2203038956f3f7213620 +Subproject commit 872e681c00a713e840ebed77a4e05fa0e181f16f diff --git a/Info.plist b/Info.plist index 19190fb41..c61e7624f 100644 --- a/Info.plist +++ b/Info.plist @@ -3,25 +3,23 @@ CFBundleDevelopmentRegion - English + en CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - + $(EXECUTABLE_NAME) CFBundleIdentifier - com.github.${PRODUCT_NAME:rfc1034Identifier} + org.libgit2.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString - 0.1 + 1.0 CFBundleSignature ???? CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Classes/Categories/NSArray+StringArray.h b/ObjectiveGit/Categories/NSArray+StringArray.h similarity index 100% rename from Classes/Categories/NSArray+StringArray.h rename to ObjectiveGit/Categories/NSArray+StringArray.h diff --git a/Classes/Categories/NSArray+StringArray.m b/ObjectiveGit/Categories/NSArray+StringArray.m similarity index 100% rename from Classes/Categories/NSArray+StringArray.m rename to ObjectiveGit/Categories/NSArray+StringArray.m diff --git a/Classes/Categories/NSData+Git.h b/ObjectiveGit/Categories/NSData+Git.h similarity index 96% rename from Classes/Categories/NSData+Git.h rename to ObjectiveGit/Categories/NSData+Git.h index a2add37f9..a2ceb4644 100644 --- a/Classes/Categories/NSData+Git.h +++ b/ObjectiveGit/Categories/NSData+Git.h @@ -2,6 +2,7 @@ // NSData+Git.h // +#import #import "git2.h" @interface NSData (Git) diff --git a/Classes/Categories/NSData+Git.m b/ObjectiveGit/Categories/NSData+Git.m similarity index 100% rename from Classes/Categories/NSData+Git.m rename to ObjectiveGit/Categories/NSData+Git.m diff --git a/Classes/Categories/NSDate+GTTimeAdditions.h b/ObjectiveGit/Categories/NSDate+GTTimeAdditions.h similarity index 100% rename from Classes/Categories/NSDate+GTTimeAdditions.h rename to ObjectiveGit/Categories/NSDate+GTTimeAdditions.h diff --git a/Classes/Categories/NSDate+GTTimeAdditions.m b/ObjectiveGit/Categories/NSDate+GTTimeAdditions.m similarity index 100% rename from Classes/Categories/NSDate+GTTimeAdditions.m rename to ObjectiveGit/Categories/NSDate+GTTimeAdditions.m diff --git a/Classes/Categories/NSError+Git.h b/ObjectiveGit/Categories/NSError+Git.h similarity index 99% rename from Classes/Categories/NSError+Git.h rename to ObjectiveGit/Categories/NSError+Git.h index b8b2195a6..bfe453dc0 100644 --- a/Classes/Categories/NSError+Git.h +++ b/ObjectiveGit/Categories/NSError+Git.h @@ -27,6 +27,8 @@ // THE SOFTWARE. // +#import + extern NSString * const GTGitErrorDomain; @interface NSError (Git) diff --git a/Classes/Categories/NSError+Git.m b/ObjectiveGit/Categories/NSError+Git.m similarity index 99% rename from Classes/Categories/NSError+Git.m rename to ObjectiveGit/Categories/NSError+Git.m index 300fd1bed..3d45d8b59 100644 --- a/Classes/Categories/NSError+Git.m +++ b/ObjectiveGit/Categories/NSError+Git.m @@ -28,7 +28,7 @@ // #import "NSError+Git.h" -#include "git2.h" +#import "git2.h" NSString * const GTGitErrorDomain = @"GTGitErrorDomain"; diff --git a/Classes/Categories/NSString+Git.h b/ObjectiveGit/Categories/NSString+Git.h similarity index 96% rename from Classes/Categories/NSString+Git.h rename to ObjectiveGit/Categories/NSString+Git.h index 33a8e6725..21568cf96 100644 --- a/Classes/Categories/NSString+Git.h +++ b/ObjectiveGit/Categories/NSString+Git.h @@ -27,7 +27,8 @@ // THE SOFTWARE. // -#include "git2.h" +#import +#import "git2.h" @interface NSString (Git) diff --git a/Classes/Categories/NSString+Git.m b/ObjectiveGit/Categories/NSString+Git.m similarity index 100% rename from Classes/Categories/NSString+Git.m rename to ObjectiveGit/Categories/NSString+Git.m diff --git a/Classes/GTBlame.h b/ObjectiveGit/GTBlame.h similarity index 100% rename from Classes/GTBlame.h rename to ObjectiveGit/GTBlame.h diff --git a/Classes/GTBlame.m b/ObjectiveGit/GTBlame.m similarity index 100% rename from Classes/GTBlame.m rename to ObjectiveGit/GTBlame.m diff --git a/Classes/GTBlameHunk.h b/ObjectiveGit/GTBlameHunk.h similarity index 100% rename from Classes/GTBlameHunk.h rename to ObjectiveGit/GTBlameHunk.h diff --git a/Classes/GTBlameHunk.m b/ObjectiveGit/GTBlameHunk.m similarity index 100% rename from Classes/GTBlameHunk.m rename to ObjectiveGit/GTBlameHunk.m diff --git a/Classes/GTBlob.h b/ObjectiveGit/GTBlob.h similarity index 100% rename from Classes/GTBlob.h rename to ObjectiveGit/GTBlob.h diff --git a/Classes/GTBlob.m b/ObjectiveGit/GTBlob.m similarity index 100% rename from Classes/GTBlob.m rename to ObjectiveGit/GTBlob.m diff --git a/Classes/GTBranch.h b/ObjectiveGit/GTBranch.h similarity index 100% rename from Classes/GTBranch.h rename to ObjectiveGit/GTBranch.h diff --git a/Classes/GTBranch.m b/ObjectiveGit/GTBranch.m similarity index 100% rename from Classes/GTBranch.m rename to ObjectiveGit/GTBranch.m diff --git a/Classes/GTCommit.h b/ObjectiveGit/GTCommit.h similarity index 100% rename from Classes/GTCommit.h rename to ObjectiveGit/GTCommit.h diff --git a/Classes/GTCommit.m b/ObjectiveGit/GTCommit.m similarity index 98% rename from Classes/GTCommit.m rename to ObjectiveGit/GTCommit.m index 1dadde88a..890c4c221 100644 --- a/Classes/GTCommit.m +++ b/ObjectiveGit/GTCommit.m @@ -101,7 +101,7 @@ - (GTTree *)tree { int gitError = git_commit_tree(&tree, self.git_commit); if (gitError < GIT_OK) { // todo: might want to return this error (and change method signature) - GTLog("Failed to get tree with error code: %d", gitError); + NSLog(@"Failed to get tree with error code: %d", gitError); return nil; } diff --git a/Classes/GTConfiguration+Private.h b/ObjectiveGit/GTConfiguration+Private.h similarity index 100% rename from Classes/GTConfiguration+Private.h rename to ObjectiveGit/GTConfiguration+Private.h diff --git a/Classes/GTConfiguration.h b/ObjectiveGit/GTConfiguration.h similarity index 96% rename from Classes/GTConfiguration.h rename to ObjectiveGit/GTConfiguration.h index 6fe3b1ba6..3987f8e59 100644 --- a/Classes/GTConfiguration.h +++ b/ObjectiveGit/GTConfiguration.h @@ -6,7 +6,8 @@ // Copyright (c) 2011 GitHub, Inc. All rights reserved. // -#include "git2.h" +#import +#import "git2.h" @class GTRepository; @class GTSignature; diff --git a/Classes/GTConfiguration.m b/ObjectiveGit/GTConfiguration.m similarity index 100% rename from Classes/GTConfiguration.m rename to ObjectiveGit/GTConfiguration.m diff --git a/Classes/GTCredential+Private.h b/ObjectiveGit/GTCredential+Private.h similarity index 100% rename from Classes/GTCredential+Private.h rename to ObjectiveGit/GTCredential+Private.h diff --git a/Classes/GTCredential.h b/ObjectiveGit/GTCredential.h similarity index 98% rename from Classes/GTCredential.h rename to ObjectiveGit/GTCredential.h index ad89b09b1..d2a9ce1b6 100644 --- a/Classes/GTCredential.h +++ b/ObjectiveGit/GTCredential.h @@ -6,6 +6,7 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // +#import #import "git2.h" /// An enum describing the data needed for authentication. diff --git a/Classes/GTCredential.m b/ObjectiveGit/GTCredential.m similarity index 99% rename from Classes/GTCredential.m rename to ObjectiveGit/GTCredential.m index 93b63836a..a89968998 100644 --- a/Classes/GTCredential.m +++ b/ObjectiveGit/GTCredential.m @@ -6,9 +6,9 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import #import "GTCredential.h" #import "GTCredential+Private.h" +#import "NSError+Git.h" typedef GTCredential *(^GTCredentialProviderBlock)(GTCredentialType allowedTypes, NSString *URL, NSString *userName); diff --git a/Classes/GTDiff+Private.h b/ObjectiveGit/GTDiff+Private.h similarity index 100% rename from Classes/GTDiff+Private.h rename to ObjectiveGit/GTDiff+Private.h diff --git a/Classes/GTDiff.h b/ObjectiveGit/GTDiff.h similarity index 99% rename from Classes/GTDiff.h rename to ObjectiveGit/GTDiff.h index e097290c1..c9846e2c5 100644 --- a/Classes/GTDiff.h +++ b/ObjectiveGit/GTDiff.h @@ -6,8 +6,8 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // +#import #import "git2.h" - #import "GTDiffDelta.h" @class GTDiffDelta; diff --git a/Classes/GTDiff.m b/ObjectiveGit/GTDiff.m similarity index 100% rename from Classes/GTDiff.m rename to ObjectiveGit/GTDiff.m diff --git a/Classes/GTDiffDelta.h b/ObjectiveGit/GTDiffDelta.h similarity index 99% rename from Classes/GTDiffDelta.h rename to ObjectiveGit/GTDiffDelta.h index c3ccfa2e1..8e2b3ec8b 100644 --- a/Classes/GTDiffDelta.h +++ b/ObjectiveGit/GTDiffDelta.h @@ -6,6 +6,7 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // +#import #import "git2.h" #import "GTDiffFile.h" diff --git a/Classes/GTDiffDelta.m b/ObjectiveGit/GTDiffDelta.m similarity index 100% rename from Classes/GTDiffDelta.m rename to ObjectiveGit/GTDiffDelta.m diff --git a/Classes/GTDiffFile.h b/ObjectiveGit/GTDiffFile.h similarity index 97% rename from Classes/GTDiffFile.h rename to ObjectiveGit/GTDiffFile.h index e4bba3780..c04c284fc 100644 --- a/Classes/GTDiffFile.h +++ b/ObjectiveGit/GTDiffFile.h @@ -6,6 +6,7 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // +#import #import "git2.h" /// Flags which may be set on the file. diff --git a/Classes/GTDiffFile.m b/ObjectiveGit/GTDiffFile.m similarity index 100% rename from Classes/GTDiffFile.m rename to ObjectiveGit/GTDiffFile.m diff --git a/Classes/GTDiffHunk.h b/ObjectiveGit/GTDiffHunk.h similarity index 97% rename from Classes/GTDiffHunk.h rename to ObjectiveGit/GTDiffHunk.h index e52f62f63..815c301e9 100644 --- a/Classes/GTDiffHunk.h +++ b/ObjectiveGit/GTDiffHunk.h @@ -6,6 +6,7 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // +#import #import "git2.h" @class GTDiffLine; diff --git a/Classes/GTDiffHunk.m b/ObjectiveGit/GTDiffHunk.m similarity index 100% rename from Classes/GTDiffHunk.m rename to ObjectiveGit/GTDiffHunk.m diff --git a/Classes/GTDiffLine.h b/ObjectiveGit/GTDiffLine.h similarity index 97% rename from Classes/GTDiffLine.h rename to ObjectiveGit/GTDiffLine.h index 250e37725..9be085262 100644 --- a/Classes/GTDiffLine.h +++ b/ObjectiveGit/GTDiffLine.h @@ -6,6 +6,7 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // +#import #import "git2.h" /// A character representing the origin of a given line. diff --git a/Classes/GTDiffLine.m b/ObjectiveGit/GTDiffLine.m similarity index 100% rename from Classes/GTDiffLine.m rename to ObjectiveGit/GTDiffLine.m diff --git a/Classes/GTDiffPatch.h b/ObjectiveGit/GTDiffPatch.h similarity index 98% rename from Classes/GTDiffPatch.h rename to ObjectiveGit/GTDiffPatch.h index fecdf917f..a0006268a 100644 --- a/Classes/GTDiffPatch.h +++ b/ObjectiveGit/GTDiffPatch.h @@ -6,6 +6,7 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // +#import #import "git2.h" @class GTDiffHunk; diff --git a/Classes/GTDiffPatch.m b/ObjectiveGit/GTDiffPatch.m similarity index 100% rename from Classes/GTDiffPatch.m rename to ObjectiveGit/GTDiffPatch.m diff --git a/Classes/GTEnumerator.h b/ObjectiveGit/GTEnumerator.h similarity index 99% rename from Classes/GTEnumerator.h rename to ObjectiveGit/GTEnumerator.h index 0ebc2395b..a466f76e3 100644 --- a/Classes/GTEnumerator.h +++ b/ObjectiveGit/GTEnumerator.h @@ -27,6 +27,7 @@ // THE SOFTWARE. // +#import #import "GTObject.h" /// Options to specify enumeration order when enumerating through a repository. diff --git a/Classes/GTEnumerator.m b/ObjectiveGit/GTEnumerator.m similarity index 100% rename from Classes/GTEnumerator.m rename to ObjectiveGit/GTEnumerator.m diff --git a/Classes/GTFetchHeadEntry.h b/ObjectiveGit/GTFetchHeadEntry.h similarity index 100% rename from Classes/GTFetchHeadEntry.h rename to ObjectiveGit/GTFetchHeadEntry.h diff --git a/Classes/GTFetchHeadEntry.m b/ObjectiveGit/GTFetchHeadEntry.m similarity index 100% rename from Classes/GTFetchHeadEntry.m rename to ObjectiveGit/GTFetchHeadEntry.m diff --git a/Classes/GTFilter.h b/ObjectiveGit/GTFilter.h similarity index 100% rename from Classes/GTFilter.h rename to ObjectiveGit/GTFilter.h diff --git a/Classes/GTFilter.m b/ObjectiveGit/GTFilter.m similarity index 100% rename from Classes/GTFilter.m rename to ObjectiveGit/GTFilter.m diff --git a/Classes/GTFilterList.h b/ObjectiveGit/GTFilterList.h similarity index 100% rename from Classes/GTFilterList.h rename to ObjectiveGit/GTFilterList.h diff --git a/Classes/GTFilterList.m b/ObjectiveGit/GTFilterList.m similarity index 100% rename from Classes/GTFilterList.m rename to ObjectiveGit/GTFilterList.m diff --git a/Classes/GTFilterSource.h b/ObjectiveGit/GTFilterSource.h similarity index 100% rename from Classes/GTFilterSource.h rename to ObjectiveGit/GTFilterSource.h diff --git a/Classes/GTFilterSource.m b/ObjectiveGit/GTFilterSource.m similarity index 100% rename from Classes/GTFilterSource.m rename to ObjectiveGit/GTFilterSource.m diff --git a/Classes/GTIndex.h b/ObjectiveGit/GTIndex.h similarity index 99% rename from Classes/GTIndex.h rename to ObjectiveGit/GTIndex.h index 6b4a636ef..924ec3dfd 100644 --- a/Classes/GTIndex.h +++ b/ObjectiveGit/GTIndex.h @@ -27,6 +27,7 @@ // THE SOFTWARE. // +#import #include "git2.h" @class GTIndexEntry; diff --git a/Classes/GTIndex.m b/ObjectiveGit/GTIndex.m similarity index 99% rename from Classes/GTIndex.m rename to ObjectiveGit/GTIndex.m index 892ec0422..81e74822f 100644 --- a/Classes/GTIndex.m +++ b/ObjectiveGit/GTIndex.m @@ -28,14 +28,16 @@ // #import "GTIndex.h" -#import "GTIndexEntry.h" -#import "NSError+Git.h" -#import "GTRepository.h" -#import "GTRepository+Private.h" + +#import "EXTScope.h" #import "GTConfiguration.h" +#import "GTIndexEntry.h" #import "GTOID.h" +#import "GTRepository+Private.h" +#import "GTRepository.h" #import "GTTree.h" -#import "EXTScope.h" +#import "NSArray+StringArray.h" +#import "NSError+Git.h" // The block synonymous with libgit2's `git_index_matched_path_cb` callback. typedef BOOL (^GTIndexPathspecMatchedBlock)(NSString *matchedPathspec, NSString *path, BOOL *stop); @@ -196,7 +198,7 @@ - (BOOL)removeFile:(NSString *)file error:(NSError **)error { if (error != NULL) *error = [NSError git_errorFor:status description:@"Failed to remove file %@ from index.", file]; return NO; } - + return YES; } @@ -212,7 +214,7 @@ - (BOOL)write:(NSError **)error { - (GTTree *)writeTree:(NSError **)error { git_oid oid; - + int status = git_index_write_tree(&oid, self.git_index); if (status != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:status description:@"Failed to write index."]; @@ -225,13 +227,13 @@ - (GTTree *)writeTree:(NSError **)error { - (GTTree *)writeTreeToRepository:(GTRepository *)repository error:(NSError **)error { NSParameterAssert(repository != nil); git_oid oid; - + int status = git_index_write_tree_to(&oid, self.git_index, repository.git_repository); if (status != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:status description:@"Failed to write index to repository %@", repository]; return NULL; } - + return [repository lookUpObjectByGitOid:&oid objectType:GTObjectTypeTree error:NULL]; } @@ -253,31 +255,31 @@ - (BOOL)hasConflicts { - (BOOL)enumerateConflictedFilesWithError:(NSError **)error usingBlock:(void (^)(GTIndexEntry *ancestor, GTIndexEntry *ours, GTIndexEntry *theirs, BOOL *stop))block { NSParameterAssert(block != nil); if (!self.hasConflicts) return YES; - + git_index_conflict_iterator *iterator = NULL; int returnCode = git_index_conflict_iterator_new(&iterator, self.git_index); if (returnCode != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:returnCode description:NSLocalizedString(@"Could not create git index iterator.", nil)]; return NO; } - + @onExit { if (iterator != NULL) git_index_conflict_iterator_free(iterator); }; - + while (YES) { const git_index_entry *ancestor = NULL; const git_index_entry *ours = NULL; const git_index_entry *theirs = NULL; - + returnCode = git_index_conflict_next(&ancestor, &ours, &theirs, iterator); if (returnCode == GIT_ITEROVER) break; - + if (returnCode != GIT_OK) { if (error != NULL) *error = [NSError git_errorFor:returnCode description:NSLocalizedString(@"Could not iterate conflict.", nil)]; return NO; } - + GTIndexEntry *blockAncestor; if (ancestor != NULL) { blockAncestor = [[GTIndexEntry alloc] initWithGitIndexEntry:ancestor]; @@ -297,7 +299,7 @@ - (BOOL)enumerateConflictedFilesWithError:(NSError **)error usingBlock:(void (^) block(blockAncestor, blockOurs, blockTheirs, &stop); if (stop) break; } - + return YES; } @@ -308,7 +310,7 @@ - (BOOL)enumerateConflictedFilesWithError:(NSError **)error usingBlock:(void (^) - (BOOL)updatePathspecs:(NSArray *)pathspecs error:(NSError **)error passingTest:(GTIndexPathspecMatchedBlock)block { NSAssert(self.repository.isBare == NO, @"This method only works with non-bare repositories."); - + const git_strarray strarray = pathspecs.git_strarray; struct GTIndexPathspecMatchedInfo payload = { .block = block, @@ -320,7 +322,7 @@ - (BOOL)updatePathspecs:(NSArray *)pathspecs error:(NSError **)error passingTest if (error != nil) *error = [NSError git_errorFor:returnCode description:NSLocalizedString(@"Could not update index.", nil)]; return NO; } - + return YES; } @@ -330,11 +332,11 @@ int GTIndexPathspecMatchFound(const char *path, const char *matched_pathspec, vo if (info->shouldAbortImmediately) { return GIT_EUSER; } - + BOOL shouldStop = NO; NSString *matchedPathspec = (matched_pathspec != nil ? @(matched_pathspec): nil); BOOL shouldUpdate = block(matchedPathspec, @(path), &shouldStop); - + if (shouldUpdate) { if (shouldStop) { info->shouldAbortImmediately = YES; diff --git a/Classes/GTIndexEntry.h b/ObjectiveGit/GTIndexEntry.h similarity index 98% rename from Classes/GTIndexEntry.h rename to ObjectiveGit/GTIndexEntry.h index f98ef163b..9c0f8f84a 100644 --- a/Classes/GTIndexEntry.h +++ b/ObjectiveGit/GTIndexEntry.h @@ -27,6 +27,7 @@ // THE SOFTWARE. // +#import #include "git2.h" typedef NS_ENUM(NSInteger, GTIndexEntryStatus) { diff --git a/Classes/GTIndexEntry.m b/ObjectiveGit/GTIndexEntry.m similarity index 100% rename from Classes/GTIndexEntry.m rename to ObjectiveGit/GTIndexEntry.m diff --git a/Classes/GTOID.h b/ObjectiveGit/GTOID.h similarity index 100% rename from Classes/GTOID.h rename to ObjectiveGit/GTOID.h diff --git a/Classes/GTOID.m b/ObjectiveGit/GTOID.m similarity index 100% rename from Classes/GTOID.m rename to ObjectiveGit/GTOID.m diff --git a/Classes/GTObject.h b/ObjectiveGit/GTObject.h similarity index 98% rename from Classes/GTObject.h rename to ObjectiveGit/GTObject.h index e580af418..d6a86cf1e 100644 --- a/Classes/GTObject.h +++ b/ObjectiveGit/GTObject.h @@ -27,7 +27,8 @@ // THE SOFTWARE. // -#include "git2.h" +#import +#import "git2.h" typedef NS_ENUM(int, GTObjectType) { GTObjectTypeAny = GIT_OBJ_ANY, /**< Object can be any of the following */ @@ -80,4 +81,3 @@ typedef NS_ENUM(int, GTObjectType) { - (id)objectByPeelingToType:(GTObjectType)type error:(NSError **)error; @end - diff --git a/Classes/GTObject.m b/ObjectiveGit/GTObject.m similarity index 100% rename from Classes/GTObject.m rename to ObjectiveGit/GTObject.m diff --git a/Classes/GTObjectDatabase.h b/ObjectiveGit/GTObjectDatabase.h similarity index 100% rename from Classes/GTObjectDatabase.h rename to ObjectiveGit/GTObjectDatabase.h diff --git a/Classes/GTObjectDatabase.m b/ObjectiveGit/GTObjectDatabase.m similarity index 100% rename from Classes/GTObjectDatabase.m rename to ObjectiveGit/GTObjectDatabase.m diff --git a/Classes/GTOdbObject.h b/ObjectiveGit/GTOdbObject.h similarity index 100% rename from Classes/GTOdbObject.h rename to ObjectiveGit/GTOdbObject.h diff --git a/Classes/GTOdbObject.m b/ObjectiveGit/GTOdbObject.m similarity index 100% rename from Classes/GTOdbObject.m rename to ObjectiveGit/GTOdbObject.m diff --git a/Classes/GTReference.h b/ObjectiveGit/GTReference.h similarity index 100% rename from Classes/GTReference.h rename to ObjectiveGit/GTReference.h diff --git a/Classes/GTReference.m b/ObjectiveGit/GTReference.m similarity index 99% rename from Classes/GTReference.m rename to ObjectiveGit/GTReference.m index 89b7d5e9e..6ae25fa4c 100644 --- a/Classes/GTReference.m +++ b/ObjectiveGit/GTReference.m @@ -24,10 +24,12 @@ // #import "GTReference.h" + #import "GTOID.h" #import "GTReflog+Private.h" -#import "GTRepository.h" #import "GTRepository+Private.h" +#import "GTRepository.h" +#import "GTSignature.h" #import "NSError+Git.h" #import "NSString+Git.h" @@ -69,7 +71,7 @@ + (id)referenceByLookingUpReferencedNamed:(NSString *)refName inRepository:(GTRe return [[self alloc] initByLookingUpReferenceNamed:refName inRepository:theRepo error:error]; } -+ (id)referenceByResolvingSymbolicReference:(GTReference *)symbolicRef error:(NSError **)error { ++ (id)referenceByResolvingSymbolicReference:(GTReference *)symbolicRef error:(NSError **)error { return [[self alloc] initByResolvingSymbolicReference:symbolicRef error:error]; } @@ -116,13 +118,13 @@ - (id)initWithGitReference:(git_reference *)ref repository:(GTRepository *)repo - (NSString *)name { const char *refName = git_reference_name(self.git_reference); if (refName == NULL) return nil; - + return @(refName); } - (GTReference *)referenceByRenaming:(NSString *)newName error:(NSError **)error { NSParameterAssert(newName != nil); - + git_reference *newRef = NULL; int gitError = git_reference_rename(&newRef, self.git_reference, newName.UTF8String, 0, [self.repository userSignatureForNow].git_signature, NULL); if (gitError != GIT_OK) { @@ -177,7 +179,7 @@ - (GTReference *)referenceByUpdatingTarget:(NSString *)newTarget committer:(GTSi if (git_reference_type(self.git_reference) == GIT_REF_OID) { GTOID *oid = [[GTOID alloc] initWithSHA:newTarget error:error]; if (oid == nil) return nil; - + gitError = git_reference_set_target(&newRef, self.git_reference, oid.git_oid, signature.git_signature, message.UTF8String); } else { gitError = git_reference_symbolic_set_target(&newRef, self.git_reference, newTarget.UTF8String, signature.git_signature, message.UTF8String); diff --git a/Classes/GTReflog+Private.h b/ObjectiveGit/GTReflog+Private.h similarity index 100% rename from Classes/GTReflog+Private.h rename to ObjectiveGit/GTReflog+Private.h diff --git a/Classes/GTReflog.h b/ObjectiveGit/GTReflog.h similarity index 97% rename from Classes/GTReflog.h rename to ObjectiveGit/GTReflog.h index 7fa387f38..35e7990c9 100644 --- a/Classes/GTReflog.h +++ b/ObjectiveGit/GTReflog.h @@ -6,6 +6,7 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // +#import #import "git2.h" @class GTSignature; diff --git a/Classes/GTReflog.m b/ObjectiveGit/GTReflog.m similarity index 100% rename from Classes/GTReflog.m rename to ObjectiveGit/GTReflog.m diff --git a/Classes/GTReflogEntry+Private.h b/ObjectiveGit/GTReflogEntry+Private.h similarity index 100% rename from Classes/GTReflogEntry+Private.h rename to ObjectiveGit/GTReflogEntry+Private.h diff --git a/Classes/GTReflogEntry.h b/ObjectiveGit/GTReflogEntry.h similarity index 95% rename from Classes/GTReflogEntry.h rename to ObjectiveGit/GTReflogEntry.h index 1e6d915d5..9f0f59160 100644 --- a/Classes/GTReflogEntry.h +++ b/ObjectiveGit/GTReflogEntry.h @@ -6,6 +6,7 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // +#import #import "git2.h" @class GTOID; diff --git a/Classes/GTReflogEntry.m b/ObjectiveGit/GTReflogEntry.m similarity index 100% rename from Classes/GTReflogEntry.m rename to ObjectiveGit/GTReflogEntry.m diff --git a/Classes/GTRemote.h b/ObjectiveGit/GTRemote.h similarity index 99% rename from Classes/GTRemote.h rename to ObjectiveGit/GTRemote.h index 1735cadaf..fcacddca9 100644 --- a/Classes/GTRemote.h +++ b/ObjectiveGit/GTRemote.h @@ -6,6 +6,7 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // +#import #import "git2.h" @class GTRepository; diff --git a/Classes/GTRemote.m b/ObjectiveGit/GTRemote.m similarity index 100% rename from Classes/GTRemote.m rename to ObjectiveGit/GTRemote.m diff --git a/Classes/GTRepository+Attributes.h b/ObjectiveGit/GTRepository+Attributes.h similarity index 100% rename from Classes/GTRepository+Attributes.h rename to ObjectiveGit/GTRepository+Attributes.h diff --git a/Classes/GTRepository+Attributes.m b/ObjectiveGit/GTRepository+Attributes.m similarity index 100% rename from Classes/GTRepository+Attributes.m rename to ObjectiveGit/GTRepository+Attributes.m diff --git a/Classes/GTRepository+Blame.h b/ObjectiveGit/GTRepository+Blame.h similarity index 95% rename from Classes/GTRepository+Blame.h rename to ObjectiveGit/GTRepository+Blame.h index 56ce36dad..c08d7dd34 100644 --- a/Classes/GTRepository+Blame.h +++ b/ObjectiveGit/GTRepository+Blame.h @@ -6,7 +6,10 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import +#import +#import "GTRepository.h" + +@class GTBlame; /// Enum for options passed to the dictionary in `-blameWithFile:inRepository:options:` /// diff --git a/Classes/GTRepository+Blame.m b/ObjectiveGit/GTRepository+Blame.m similarity index 97% rename from Classes/GTRepository+Blame.m rename to ObjectiveGit/GTRepository+Blame.m index 2e9eecfe2..afebfbac6 100644 --- a/Classes/GTRepository+Blame.m +++ b/ObjectiveGit/GTRepository+Blame.m @@ -7,7 +7,10 @@ // #import "GTRepository+Blame.h" + #import "git2.h" +#import "GTBlame.h" +#import "NSError+Git.h" NSString * const GTBlameOptionsFlags = @"GTBlameOptionsFlags"; NSString * const GTBlameOptionsNewestCommitOID = @"GTBlameOptionsNewestCommitOID"; diff --git a/Classes/GTRepository+Committing.h b/ObjectiveGit/GTRepository+Committing.h similarity index 100% rename from Classes/GTRepository+Committing.h rename to ObjectiveGit/GTRepository+Committing.h diff --git a/Classes/GTRepository+Committing.m b/ObjectiveGit/GTRepository+Committing.m similarity index 94% rename from Classes/GTRepository+Committing.m rename to ObjectiveGit/GTRepository+Committing.m index ff2664c08..40383b503 100644 --- a/Classes/GTRepository+Committing.m +++ b/ObjectiveGit/GTRepository+Committing.m @@ -9,6 +9,12 @@ #import "GTRepository+Committing.h" #import "GTRepository+Private.h" +#import "git2/commit.h" +#import "GTCommit.h" +#import "GTSignature.h" +#import "GTTree.h" +#import "NSError+Git.h" + @implementation GTRepository (Committing) - (GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message parents:(NSArray *)parents updatingReferenceNamed:(NSString *)refName error:(NSError **)error { diff --git a/Classes/GTRepository+Private.h b/ObjectiveGit/GTRepository+Private.h similarity index 90% rename from Classes/GTRepository+Private.h rename to ObjectiveGit/GTRepository+Private.h index 174770d85..9fc6577c9 100644 --- a/Classes/GTRepository+Private.h +++ b/ObjectiveGit/GTRepository+Private.h @@ -6,7 +6,7 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import +#import "GTRepository.h" @interface GTRepository () - (id)lookUpObjectByGitOid:(const git_oid *)oid objectType:(GTObjectType)type error:(NSError **)error; diff --git a/Classes/GTRepository+RemoteOperations.h b/ObjectiveGit/GTRepository+RemoteOperations.h similarity index 97% rename from Classes/GTRepository+RemoteOperations.h rename to ObjectiveGit/GTRepository+RemoteOperations.h index 029745234..f824f4651 100644 --- a/Classes/GTRepository+RemoteOperations.h +++ b/ObjectiveGit/GTRepository+RemoteOperations.h @@ -6,7 +6,7 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import +#import "GTRepository.h" /// A `GTCredentialProvider`, that will be used to authenticate against the remote. extern NSString *const GTRepositoryRemoteOptionsCredentialProvider; diff --git a/Classes/GTRepository+RemoteOperations.m b/ObjectiveGit/GTRepository+RemoteOperations.m similarity index 97% rename from Classes/GTRepository+RemoteOperations.m rename to ObjectiveGit/GTRepository+RemoteOperations.m index 26f338e79..b9f7fe962 100644 --- a/Classes/GTRepository+RemoteOperations.m +++ b/ObjectiveGit/GTRepository+RemoteOperations.m @@ -8,9 +8,14 @@ #import "GTRepository+RemoteOperations.h" +#import "EXTScope.h" #import "GTCredential.h" #import "GTCredential+Private.h" -#import "EXTScope.h" +#import "GTFetchHeadEntry.h" +#import "GTOID.h" +#import "GTRemote.h" +#import "GTSignature.h" +#import "NSError+Git.h" NSString *const GTRepositoryRemoteOptionsCredentialProvider = @"GTRepositoryRemoteOptionsCredentialProvider"; diff --git a/Classes/GTRepository+Reset.h b/ObjectiveGit/GTRepository+Reset.h similarity index 100% rename from Classes/GTRepository+Reset.h rename to ObjectiveGit/GTRepository+Reset.h diff --git a/Classes/GTRepository+Reset.m b/ObjectiveGit/GTRepository+Reset.m similarity index 100% rename from Classes/GTRepository+Reset.m rename to ObjectiveGit/GTRepository+Reset.m diff --git a/Classes/GTRepository+Stashing.h b/ObjectiveGit/GTRepository+Stashing.h similarity index 100% rename from Classes/GTRepository+Stashing.h rename to ObjectiveGit/GTRepository+Stashing.h diff --git a/Classes/GTRepository+Stashing.m b/ObjectiveGit/GTRepository+Stashing.m similarity index 100% rename from Classes/GTRepository+Stashing.m rename to ObjectiveGit/GTRepository+Stashing.m diff --git a/Classes/GTRepository+Status.h b/ObjectiveGit/GTRepository+Status.h similarity index 100% rename from Classes/GTRepository+Status.h rename to ObjectiveGit/GTRepository+Status.h diff --git a/Classes/GTRepository+Status.m b/ObjectiveGit/GTRepository+Status.m similarity index 100% rename from Classes/GTRepository+Status.m rename to ObjectiveGit/GTRepository+Status.m diff --git a/Classes/GTRepository.h b/ObjectiveGit/GTRepository.h similarity index 99% rename from Classes/GTRepository.h rename to ObjectiveGit/GTRepository.h index ead3eaec9..4c6fa00b9 100644 --- a/Classes/GTRepository.h +++ b/ObjectiveGit/GTRepository.h @@ -27,7 +27,7 @@ // THE SOFTWARE. // - +#import #import "GTBranch.h" #import "GTEnumerator.h" #import "GTFilterSource.h" diff --git a/Classes/GTRepository.m b/ObjectiveGit/GTRepository.m similarity index 100% rename from Classes/GTRepository.m rename to ObjectiveGit/GTRepository.m diff --git a/Classes/GTSignature.h b/ObjectiveGit/GTSignature.h similarity index 100% rename from Classes/GTSignature.h rename to ObjectiveGit/GTSignature.h diff --git a/Classes/GTSignature.m b/ObjectiveGit/GTSignature.m similarity index 100% rename from Classes/GTSignature.m rename to ObjectiveGit/GTSignature.m diff --git a/Classes/GTStatusDelta.h b/ObjectiveGit/GTStatusDelta.h similarity index 100% rename from Classes/GTStatusDelta.h rename to ObjectiveGit/GTStatusDelta.h diff --git a/Classes/GTStatusDelta.m b/ObjectiveGit/GTStatusDelta.m similarity index 100% rename from Classes/GTStatusDelta.m rename to ObjectiveGit/GTStatusDelta.m diff --git a/Classes/GTSubmodule.h b/ObjectiveGit/GTSubmodule.h similarity index 100% rename from Classes/GTSubmodule.h rename to ObjectiveGit/GTSubmodule.h diff --git a/Classes/GTSubmodule.m b/ObjectiveGit/GTSubmodule.m similarity index 100% rename from Classes/GTSubmodule.m rename to ObjectiveGit/GTSubmodule.m diff --git a/Classes/GTTag.h b/ObjectiveGit/GTTag.h similarity index 100% rename from Classes/GTTag.h rename to ObjectiveGit/GTTag.h diff --git a/Classes/GTTag.m b/ObjectiveGit/GTTag.m similarity index 100% rename from Classes/GTTag.m rename to ObjectiveGit/GTTag.m diff --git a/Classes/GTTree.h b/ObjectiveGit/GTTree.h similarity index 100% rename from Classes/GTTree.h rename to ObjectiveGit/GTTree.h diff --git a/Classes/GTTree.m b/ObjectiveGit/GTTree.m similarity index 100% rename from Classes/GTTree.m rename to ObjectiveGit/GTTree.m diff --git a/Classes/GTTreeBuilder.h b/ObjectiveGit/GTTreeBuilder.h similarity index 99% rename from Classes/GTTreeBuilder.h rename to ObjectiveGit/GTTreeBuilder.h index e43471d2a..519505076 100644 --- a/Classes/GTTreeBuilder.h +++ b/ObjectiveGit/GTTreeBuilder.h @@ -28,7 +28,7 @@ // #import -#include "git2.h" +#import "git2.h" /// The mode of an index or tree entry. typedef NS_ENUM(NSInteger, GTFileMode) { diff --git a/Classes/GTTreeBuilder.m b/ObjectiveGit/GTTreeBuilder.m similarity index 100% rename from Classes/GTTreeBuilder.m rename to ObjectiveGit/GTTreeBuilder.m diff --git a/Classes/GTTreeEntry.h b/ObjectiveGit/GTTreeEntry.h similarity index 100% rename from Classes/GTTreeEntry.h rename to ObjectiveGit/GTTreeEntry.h diff --git a/Classes/GTTreeEntry.m b/ObjectiveGit/GTTreeEntry.m similarity index 100% rename from Classes/GTTreeEntry.m rename to ObjectiveGit/GTTreeEntry.m diff --git a/Classes/ObjectiveGit.h b/ObjectiveGit/ObjectiveGit.h similarity index 91% rename from Classes/ObjectiveGit.h rename to ObjectiveGit/ObjectiveGit.h index 11dbdc1fe..0108166a0 100644 --- a/Classes/ObjectiveGit.h +++ b/ObjectiveGit/ObjectiveGit.h @@ -23,8 +23,15 @@ // THE SOFTWARE. // +#import #import "git2.h" +//! Project version number for ObjectiveGit. +FOUNDATION_EXPORT double ObjectiveGitVersionNumber; + +//! Project version string for ObjectiveGit. +FOUNDATION_EXPORT const unsigned char ObjectiveGitVersionString[]; + #import #import #import @@ -66,6 +73,7 @@ #import #import +#import #import #import diff --git a/Classes/ObjectiveGit.m b/ObjectiveGit/ObjectiveGit.m similarity index 100% rename from Classes/ObjectiveGit.m rename to ObjectiveGit/ObjectiveGit.m diff --git a/ObjectiveGitFramework.xcodeproj/project.pbxproj b/ObjectiveGitFramework.xcodeproj/project.pbxproj index 3344198c2..a726d3e6a 100644 --- a/ObjectiveGitFramework.xcodeproj/project.pbxproj +++ b/ObjectiveGitFramework.xcodeproj/project.pbxproj @@ -57,188 +57,90 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - 04DB464E133AB5E200D9C624 /* NSError+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = BDE4C060130EFE2C00851650 /* NSError+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB464F133AB5E200D9C624 /* GTRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = BDE4C062130EFE2C00851650 /* GTRepository.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4652133AB5E200D9C624 /* GTEnumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD8AE6D13131B8800CB5D40 /* GTEnumerator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4653133AB5E200D9C624 /* GTTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6B040F131496B8001909D0 /* GTTree.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4654133AB5E200D9C624 /* GTTreeEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6B0415131496CC001909D0 /* GTTreeEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4655133AB5E200D9C624 /* GTBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD627971318391200DE34D1 /* GTBlob.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4656133AB5E200D9C624 /* GTTag.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD62922131C03D600DE34D1 /* GTTag.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4657133AB5E200D9C624 /* GTIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = BDFAF9C1131C1845000508BC /* GTIndex.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4658133AB5E200D9C624 /* GTIndexEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = BDFAF9C7131C1868000508BC /* GTIndexEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4659133AB5E200D9C624 /* GTReference.h in Headers */ = {isa = PBXBuildFile; fileRef = BD441E06131ED0C300187010 /* GTReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB465A133AB5E200D9C624 /* ObjectiveGit.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB465B133AB5E200D9C624 /* GTCommit.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C22A41314609A00992935 /* GTCommit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB465C133AB5E200D9C624 /* GTObject.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C22A71314625800992935 /* GTObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB465D133AB5E200D9C624 /* GTSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C254313148DC900992935 /* GTSignature.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB465E133AB5E200D9C624 /* GTBranch.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F50F56132054D800584FBE /* GTBranch.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 04DB4660133AB5EB00D9C624 /* NSError+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BDE4C061130EFE2C00851650 /* NSError+Git.m */; }; - 04DB4661133AB5EB00D9C624 /* GTRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = BDE4C063130EFE2C00851650 /* GTRepository.m */; }; - 04DB4664133AB5EB00D9C624 /* GTEnumerator.m in Sources */ = {isa = PBXBuildFile; fileRef = BDD8AE6E13131B8800CB5D40 /* GTEnumerator.m */; }; - 04DB4665133AB5EB00D9C624 /* GTCommit.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C22A51314609A00992935 /* GTCommit.m */; }; - 04DB4666133AB5EB00D9C624 /* GTObject.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C22A81314625800992935 /* GTObject.m */; }; - 04DB4667133AB5EB00D9C624 /* GTSignature.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C254413148DC900992935 /* GTSignature.m */; }; - 04DB4668133AB5EB00D9C624 /* GTTree.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6B0410131496B8001909D0 /* GTTree.m */; }; - 04DB4669133AB5EB00D9C624 /* GTTreeEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6B0416131496CC001909D0 /* GTTreeEntry.m */; }; - 04DB466A133AB5EB00D9C624 /* GTBlob.m in Sources */ = {isa = PBXBuildFile; fileRef = BDD627981318391200DE34D1 /* GTBlob.m */; }; - 04DB466B133AB5EB00D9C624 /* GTTag.m in Sources */ = {isa = PBXBuildFile; fileRef = BDD62923131C03D600DE34D1 /* GTTag.m */; }; - 04DB466C133AB5EB00D9C624 /* GTIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = BDFAF9C2131C1845000508BC /* GTIndex.m */; }; - 04DB466D133AB5EB00D9C624 /* GTIndexEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = BDFAF9C8131C1868000508BC /* GTIndexEntry.m */; }; - 04DB466E133AB5EB00D9C624 /* GTReference.m in Sources */ = {isa = PBXBuildFile; fileRef = BD441E07131ED0C300187010 /* GTReference.m */; }; - 04DB466F133AB5EB00D9C624 /* GTBranch.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F50F57132054D800584FBE /* GTBranch.m */; }; 200578C518932A82001C06C3 /* GTBlameSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 200578C418932A82001C06C3 /* GTBlameSpec.m */; }; - 20702DAF18A1F38A009FB457 /* GTBlame.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D9510182A81E1004AF532 /* GTBlame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 20702DB118A1F38A009FB457 /* GTBlameHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D951A182AB25C004AF532 /* GTBlameHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2089E43C17D9A58000F451DA /* GTTagSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 2089E43B17D9A58000F451DA /* GTTagSpec.m */; }; 20F43DE318A2F668007D3621 /* GTRepository+Blame.h in Headers */ = {isa = PBXBuildFile; fileRef = 20F43DE118A2F667007D3621 /* GTRepository+Blame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 20F43DE418A2F668007D3621 /* GTRepository+Blame.h in Headers */ = {isa = PBXBuildFile; fileRef = 20F43DE118A2F667007D3621 /* GTRepository+Blame.h */; settings = {ATTRIBUTES = (Public, ); }; }; 20F43DE618A2F668007D3621 /* GTRepository+Blame.m in Sources */ = {isa = PBXBuildFile; fileRef = 20F43DE218A2F667007D3621 /* GTRepository+Blame.m */; }; - 20F43DE718A2F668007D3621 /* GTRepository+Blame.m in Sources */ = {isa = PBXBuildFile; fileRef = 20F43DE218A2F667007D3621 /* GTRepository+Blame.m */; }; 3011D86B1668E48500CE3409 /* GTDiffFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8691668E48500CE3409 /* GTDiffFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3011D86C1668E48500CE3409 /* GTDiffFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8691668E48500CE3409 /* GTDiffFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3011D86D1668E48500CE3409 /* GTDiffFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D86A1668E48500CE3409 /* GTDiffFile.m */; }; - 3011D86E1668E48500CE3409 /* GTDiffFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D86A1668E48500CE3409 /* GTDiffFile.m */; }; 3011D8711668E78500CE3409 /* GTDiffHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D86F1668E78500CE3409 /* GTDiffHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3011D8721668E78500CE3409 /* GTDiffHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D86F1668E78500CE3409 /* GTDiffHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3011D8731668E78500CE3409 /* GTDiffHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D8701668E78500CE3409 /* GTDiffHunk.m */; }; - 3011D8741668E78500CE3409 /* GTDiffHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D8701668E78500CE3409 /* GTDiffHunk.m */; }; 3011D8771668F29600CE3409 /* GTDiffDelta.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8751668F29600CE3409 /* GTDiffDelta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3011D8781668F29600CE3409 /* GTDiffDelta.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8751668F29600CE3409 /* GTDiffDelta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3011D8791668F29600CE3409 /* GTDiffDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D8761668F29600CE3409 /* GTDiffDelta.m */; }; - 3011D87A1668F29600CE3409 /* GTDiffDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D8761668F29600CE3409 /* GTDiffDelta.m */; }; - 306123AC17EA5261006591D4 /* EXTScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 306123A917EA5261006591D4 /* EXTScope.h */; }; - 306123AD17EA5261006591D4 /* EXTScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 306123A917EA5261006591D4 /* EXTScope.h */; }; 306123AE17EA5261006591D4 /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 306123AA17EA5261006591D4 /* EXTScope.m */; }; - 306123AF17EA5261006591D4 /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 306123AA17EA5261006591D4 /* EXTScope.m */; }; - 306123B017EA5261006591D4 /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 306123AA17EA5261006591D4 /* EXTScope.m */; }; - 306123B117EA5261006591D4 /* metamacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 306123AB17EA5261006591D4 /* metamacros.h */; }; - 306123B217EA5261006591D4 /* metamacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 306123AB17EA5261006591D4 /* metamacros.h */; }; 307623AB17C6C8BD00E2CDF1 /* NSArray+StringArraySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 307623AA17C6C8BD00E2CDF1 /* NSArray+StringArraySpec.m */; }; 30865A91167F503400B1AB6E /* GTDiffSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 30865A90167F503400B1AB6E /* GTDiffSpec.m */; }; 30A269AD17B4878C000FE64E /* GTRepository+StatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A269AC17B4878C000FE64E /* GTRepository+StatusSpec.m */; }; 30A3D6541667F11C00C49A39 /* GTDiff.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A3D6521667F11C00C49A39 /* GTDiff.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30A3D6551667F11C00C49A39 /* GTDiff.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A3D6521667F11C00C49A39 /* GTDiff.h */; settings = {ATTRIBUTES = (Public, ); }; }; 30A3D6561667F11C00C49A39 /* GTDiff.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A3D6531667F11C00C49A39 /* GTDiff.m */; }; - 30A3D6571667F11C00C49A39 /* GTDiff.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A3D6531667F11C00C49A39 /* GTDiff.m */; }; - 30B1E7EE1703522100D0814D /* NSDate+GTTimeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B1E7EC1703522100D0814D /* NSDate+GTTimeAdditions.h */; }; - 30B1E7EF1703522100D0814D /* NSDate+GTTimeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B1E7EC1703522100D0814D /* NSDate+GTTimeAdditions.h */; }; 30B1E7F01703522100D0814D /* NSDate+GTTimeAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B1E7ED1703522100D0814D /* NSDate+GTTimeAdditions.m */; }; - 30B1E7F11703522100D0814D /* NSDate+GTTimeAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B1E7ED1703522100D0814D /* NSDate+GTTimeAdditions.m */; }; 30B1E8001703871900D0814D /* GTTimeAdditionsSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B1E7FF1703871900D0814D /* GTTimeAdditionsSpec.m */; }; 30DCBA5C17B45213009B0EBD /* GTStatusDelta.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA5A17B45213009B0EBD /* GTStatusDelta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30DCBA5D17B45213009B0EBD /* GTStatusDelta.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA5A17B45213009B0EBD /* GTStatusDelta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 30DCBA5E17B45213009B0EBD /* GTStatusDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA5B17B45213009B0EBD /* GTStatusDelta.m */; }; - 30DCBA5F17B45213009B0EBD /* GTStatusDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA5B17B45213009B0EBD /* GTStatusDelta.m */; }; - 30DCBA6017B45213009B0EBD /* GTStatusDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA5B17B45213009B0EBD /* GTStatusDelta.m */; }; 30DCBA6317B45A78009B0EBD /* GTRepository+Status.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA6117B45A78009B0EBD /* GTRepository+Status.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30DCBA6417B45A78009B0EBD /* GTRepository+Status.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA6117B45A78009B0EBD /* GTRepository+Status.h */; settings = {ATTRIBUTES = (Public, ); }; }; 30DCBA6517B45A78009B0EBD /* GTRepository+Status.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA6217B45A78009B0EBD /* GTRepository+Status.m */; }; - 30DCBA6617B45A78009B0EBD /* GTRepository+Status.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA6217B45A78009B0EBD /* GTRepository+Status.m */; }; - 30DCBA6717B45A78009B0EBD /* GTRepository+Status.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA6217B45A78009B0EBD /* GTRepository+Status.m */; }; 30DCBA7317B4791A009B0EBD /* NSArray+StringArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA7017B4791A009B0EBD /* NSArray+StringArray.m */; }; - 30DCBA7417B4791A009B0EBD /* NSArray+StringArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA7017B4791A009B0EBD /* NSArray+StringArray.m */; }; - 30DCBA7517B4791A009B0EBD /* NSArray+StringArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA7017B4791A009B0EBD /* NSArray+StringArray.m */; }; 30FDC07F16835A8100654BF0 /* GTDiffLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 30FDC07D16835A8100654BF0 /* GTDiffLine.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 30FDC08016835A8100654BF0 /* GTDiffLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 30FDC07D16835A8100654BF0 /* GTDiffLine.h */; settings = {ATTRIBUTES = (Public, ); }; }; 30FDC08116835A8100654BF0 /* GTDiffLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 30FDC07E16835A8100654BF0 /* GTDiffLine.m */; }; - 30FDC08216835A8100654BF0 /* GTDiffLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 30FDC07E16835A8100654BF0 /* GTDiffLine.m */; }; - 398F8AA6183111080071359D /* GTCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D79C0EC17DF9F4D00997DE4 /* GTCredential.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 398F8AA7183111260071359D /* GTCredential.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D79C0ED17DF9F4D00997DE4 /* GTCredential.m */; }; - 3E0A23E5159E0FDB00A6068F /* GTObjectDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 55C8054C13861F34004DCB0F /* GTObjectDatabase.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4D103ADD1819CFAA0029DB24 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D103ADC1819CFAA0029DB24 /* libiconv.dylib */; }; 4D123240178E009E0048F785 /* GTRepositoryCommittingSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D12323F178E009E0048F785 /* GTRepositoryCommittingSpec.m */; }; 4D1C40D8182C006D00BE2960 /* GTBlobSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1C40D7182C006D00BE2960 /* GTBlobSpec.m */; }; 4D79C0EE17DF9F4D00997DE4 /* GTCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D79C0EC17DF9F4D00997DE4 /* GTCredential.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4D79C0EF17DF9F4D00997DE4 /* GTCredential.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D79C0ED17DF9F4D00997DE4 /* GTCredential.m */; }; - 4D79C0F717DFAA7100997DE4 /* GTCredential+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D79C0F617DFAA7100997DE4 /* GTCredential+Private.h */; }; 4DBA4A3217DA73CE006CD5F5 /* GTRemoteSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DBA4A3117DA73CE006CD5F5 /* GTRemoteSpec.m */; }; - 4DE864351794A37E00371A65 /* GTRepository+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DE864341794A37E00371A65 /* GTRepository+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 4DE864361794A37E00371A65 /* GTRepository+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DE864341794A37E00371A65 /* GTRepository+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4DFFB15B183AA8D600D1565E /* GTRepository+RemoteOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DFFB159183AA8D600D1565E /* GTRepository+RemoteOperations.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4DFFB15C183AA8D600D1565E /* GTRepository+RemoteOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DFFB15A183AA8D600D1565E /* GTRepository+RemoteOperations.m */; }; - 55C8054F13861FE7004DCB0F /* GTObjectDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8054D13861F34004DCB0F /* GTObjectDatabase.m */; }; 55C8055013861FE7004DCB0F /* GTObjectDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8054D13861F34004DCB0F /* GTObjectDatabase.m */; }; 55C8057A13875578004DCB0F /* NSString+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8057313874CDF004DCB0F /* NSString+Git.m */; }; - 55C8057C13875579004DCB0F /* NSString+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8057313874CDF004DCB0F /* NSString+Git.m */; }; 55C8057D13875C11004DCB0F /* NSData+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C2266131459E700992935 /* NSData+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; 55C8057E13875C1B004DCB0F /* NSString+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = 55C8057213874CDF004DCB0F /* NSString+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 55C8057F13875C62004DCB0F /* NSData+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C2266131459E700992935 /* NSData+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 55C8058013875C6E004DCB0F /* NSString+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = 55C8057213874CDF004DCB0F /* NSString+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5BE612881745EE3400266D8C /* GTTreeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BE612861745EE3300266D8C /* GTTreeBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5BE612891745EE3400266D8C /* GTTreeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BE612861745EE3300266D8C /* GTTreeBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; 5BE6128A1745EE3400266D8C /* GTTreeBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BE612871745EE3300266D8C /* GTTreeBuilder.m */; }; - 5BE6128B1745EE3400266D8C /* GTTreeBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BE612871745EE3300266D8C /* GTTreeBuilder.m */; }; 5BE612931745EEBC00266D8C /* GTTreeBuilderSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BE612921745EEBC00266D8C /* GTTreeBuilderSpec.m */; }; - 6A1F2FD517C6A8F3003DFADE /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A1F2FD317C6A8F3003DFADE /* libcrypto.a */; }; - 6A1F2FD617C6A8F3003DFADE /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A1F2FD417C6A8F3003DFADE /* libssl.a */; }; - 6A74CA3216A9429700E1A3C5 /* GTRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 883CD6AA1600EBC600F57354 /* GTRemote.m */; }; - 6A74CA3416A942AA00E1A3C5 /* NSData+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C2267131459E700992935 /* NSData+Git.m */; }; - 6A74CA3616A942C000E1A3C5 /* GTConfiguration+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 883CD6AE1600F01000F57354 /* GTConfiguration+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6A74CA3716A942C800E1A3C5 /* GTRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 883CD6A91600EBC600F57354 /* GTRemote.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6A74CA3816A9432A00E1A3C5 /* ObjectiveGit.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */; }; - 6E98A3CB199A892C0048E067 /* GTRepository+RemoteOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DFFB15A183AA8D600D1565E /* GTRepository+RemoteOperations.m */; }; - 6E98A3CC199A89300048E067 /* GTRepository+RemoteOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DFFB159183AA8D600D1565E /* GTRepository+RemoteOperations.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6EEB51A1199D62B9001D72C0 /* GTFetchHeadEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EEB519F199D62B9001D72C0 /* GTFetchHeadEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6EEB51A2199D62B9001D72C0 /* GTFetchHeadEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEB51A0199D62B9001D72C0 /* GTFetchHeadEntry.m */; }; - 6EEB51A3199D62CC001D72C0 /* GTFetchHeadEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EEB519F199D62B9001D72C0 /* GTFetchHeadEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EEB51A4199D62D3001D72C0 /* GTFetchHeadEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEB51A0199D62B9001D72C0 /* GTFetchHeadEntry.m */; }; 79262F1013C697C100A4B1EA /* git2 in Copy git2 Headers */ = {isa = PBXBuildFile; fileRef = 79262F0E13C697BE00A4B1EA /* git2 */; }; 79262F8B13C69B1600A4B1EA /* git2.h in Headers */ = {isa = PBXBuildFile; fileRef = 79262F8A13C69B1600A4B1EA /* git2.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8803DA871313145700E6E818 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8803DA861313145700E6E818 /* libz.dylib */; }; 880EE66118AE700500B82455 /* GTFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 880EE65F18AE700500B82455 /* GTFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 880EE66218AE700500B82455 /* GTFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 880EE65F18AE700500B82455 /* GTFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 880EE66318AE700500B82455 /* GTFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 880EE66018AE700500B82455 /* GTFilter.m */; }; - 880EE66418AE700500B82455 /* GTFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 880EE66018AE700500B82455 /* GTFilter.m */; }; 882154691714740500D76B76 /* GTReflog.h in Headers */ = {isa = PBXBuildFile; fileRef = 882154671714740500D76B76 /* GTReflog.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8821546A1714740500D76B76 /* GTReflog.h in Headers */ = {isa = PBXBuildFile; fileRef = 882154671714740500D76B76 /* GTReflog.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8821546B1714740500D76B76 /* GTReflog.m in Sources */ = {isa = PBXBuildFile; fileRef = 882154681714740500D76B76 /* GTReflog.m */; }; - 8821546C1714740500D76B76 /* GTReflog.m in Sources */ = {isa = PBXBuildFile; fileRef = 882154681714740500D76B76 /* GTReflog.m */; }; 8821547617147A5200D76B76 /* GTReflogEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8821547417147A5100D76B76 /* GTReflogEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8821547717147A5200D76B76 /* GTReflogEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8821547417147A5100D76B76 /* GTReflogEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8821547817147A5200D76B76 /* GTReflogEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 8821547517147A5200D76B76 /* GTReflogEntry.m */; }; - 8821547917147A5200D76B76 /* GTReflogEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 8821547517147A5200D76B76 /* GTReflogEntry.m */; }; 8821547D17147B3600D76B76 /* GTOID.h in Headers */ = {isa = PBXBuildFile; fileRef = 8821547B17147B3600D76B76 /* GTOID.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8821547E17147B3600D76B76 /* GTOID.h in Headers */ = {isa = PBXBuildFile; fileRef = 8821547B17147B3600D76B76 /* GTOID.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8821547F17147B3600D76B76 /* GTOID.m in Sources */ = {isa = PBXBuildFile; fileRef = 8821547C17147B3600D76B76 /* GTOID.m */; }; - 8821548017147B3600D76B76 /* GTOID.m in Sources */ = {isa = PBXBuildFile; fileRef = 8821547C17147B3600D76B76 /* GTOID.m */; }; 88215483171499BE00D76B76 /* GTReflogSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88215482171499BE00D76B76 /* GTReflogSpec.m */; }; 88234B2618F2FE260039972E /* GTRepositoryResetSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88234B2518F2FE260039972E /* GTRepositoryResetSpec.m */; }; 8832811F173D8816006D7DCF /* GTIndexSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8832811E173D8816006D7DCF /* GTIndexSpec.m */; }; 88328128173D8A64006D7DCF /* GTTreeSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88328127173D8A64006D7DCF /* GTTreeSpec.m */; }; 883CD6AB1600EBC600F57354 /* GTRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 883CD6A91600EBC600F57354 /* GTRemote.h */; settings = {ATTRIBUTES = (Public, ); }; }; 883CD6AC1600EBC600F57354 /* GTRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 883CD6AA1600EBC600F57354 /* GTRemote.m */; }; + 884C8A3719FF4B4D0017E98D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 884C8A3619FF4B4D0017E98D /* libz.dylib */; }; + 884C8A3919FF4B6D0017E98D /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 884C8A3819FF4B6D0017E98D /* libiconv.dylib */; }; + 884C8A3A19FF4B890017E98D /* EXTScope.m in Sources */ = {isa = PBXBuildFile; fileRef = 306123AA17EA5261006591D4 /* EXTScope.m */; }; 886E622A18AEBF75000611A0 /* GTFilterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 886E622818AEBF75000611A0 /* GTFilterSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 886E622B18AEBF75000611A0 /* GTFilterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 886E622818AEBF75000611A0 /* GTFilterSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 886E622C18AEBF75000611A0 /* GTFilterSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E622918AEBF75000611A0 /* GTFilterSource.m */; }; - 886E622D18AEBF75000611A0 /* GTFilterSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E622918AEBF75000611A0 /* GTFilterSource.m */; }; 886E623718AECD86000611A0 /* GTFilterSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E623618AECD86000611A0 /* GTFilterSpec.m */; }; 8870390B1975E3F2004118D7 /* GTDiffDeltaSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8870390A1975E3F2004118D7 /* GTDiffDeltaSpec.m */; }; 88746CC417FA1C950005888A /* GTRepository+Committing.h in Headers */ = {isa = PBXBuildFile; fileRef = 88746CC217FA1C950005888A /* GTRepository+Committing.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88746CC517FA1C950005888A /* GTRepository+Committing.h in Headers */ = {isa = PBXBuildFile; fileRef = 88746CC217FA1C950005888A /* GTRepository+Committing.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88746CC617FA1C950005888A /* GTRepository+Committing.m in Sources */ = {isa = PBXBuildFile; fileRef = 88746CC317FA1C950005888A /* GTRepository+Committing.m */; }; - 88746CC717FA1C950005888A /* GTRepository+Committing.m in Sources */ = {isa = PBXBuildFile; fileRef = 88746CC317FA1C950005888A /* GTRepository+Committing.m */; }; 88948AC91779243600809CDA /* GTObjectDatabaseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88948AC81779243600809CDA /* GTObjectDatabaseSpec.m */; }; + 889923FB19FF5DD40092A9A6 /* git2 in Headers */ = {isa = PBXBuildFile; fileRef = 889923F919FF5DD40092A9A6 /* git2 */; settings = {ATTRIBUTES = (Public, ); }; }; 88A994BA16FCE7D400402C7B /* GTBranchSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994B916FCE7D400402C7B /* GTBranchSpec.m */; }; - 88A994CB16FCED1D00402C7B /* GTTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994CA16FCED1D00402C7B /* GTTestCase.m */; }; + 88A994CB16FCED1D00402C7B /* QuickSpec+GTFixtures.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */; }; 88BC0E5018EF4F3600C7D0E6 /* GTRepository+Reset.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BC0E4E18EF4F3600C7D0E6 /* GTRepository+Reset.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88BC0E5118EF4F3600C7D0E6 /* GTRepository+Reset.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BC0E4E18EF4F3600C7D0E6 /* GTRepository+Reset.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88BC0E5218EF4F3600C7D0E6 /* GTRepository+Reset.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BC0E4F18EF4F3600C7D0E6 /* GTRepository+Reset.m */; }; - 88BC0E5318EF4F3600C7D0E6 /* GTRepository+Reset.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BC0E4F18EF4F3600C7D0E6 /* GTRepository+Reset.m */; }; 88C0BC5917038CF3009E99AA /* GTConfigurationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88C0BC5817038CF3009E99AA /* GTConfigurationSpec.m */; }; 88E353001982E9160051001F /* GTRepository+Attributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 88E352FE1982E9160051001F /* GTRepository+Attributes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88E353011982E9160051001F /* GTRepository+Attributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 88E352FE1982E9160051001F /* GTRepository+Attributes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88E353021982E9160051001F /* GTRepository+Attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 88E352FF1982E9160051001F /* GTRepository+Attributes.m */; }; - 88E353031982E9160051001F /* GTRepository+Attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 88E352FF1982E9160051001F /* GTRepository+Attributes.m */; }; 88E353061982EA6B0051001F /* GTRepositoryAttributesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88E353051982EA6B0051001F /* GTRepositoryAttributesSpec.m */; }; 88EB7E4D14AEBA600046FEA4 /* GTConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EB7E4B14AEBA600046FEA4 /* GTConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88EB7E4E14AEBA600046FEA4 /* GTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EB7E4C14AEBA600046FEA4 /* GTConfiguration.m */; }; 88F05A9E16011F6E00B7AD1D /* ObjectiveGit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* ObjectiveGit.framework */; }; 88F05AB516011FFD00B7AD1D /* GTCommitSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F05AA416011FFD00B7AD1D /* GTCommitSpec.m */; }; - 88F05AB916011FFD00B7AD1D /* GTObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F05AA816011FFD00B7AD1D /* GTObjectTest.m */; }; - 88F05AC41601204200B7AD1D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 88F05A7816011E5400B7AD1D /* InfoPlist.strings */; }; + 88F05AB916011FFD00B7AD1D /* GTObjectSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F05AA816011FFD00B7AD1D /* GTObjectSpec.m */; }; 88F05AC61601209A00B7AD1D /* ObjectiveGit.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */; }; - 88F05AC716012CE500B7AD1D /* NSString+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8057313874CDF004DCB0F /* NSString+Git.m */; }; - 88F05AC816012CEE00B7AD1D /* NSData+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C2267131459E700992935 /* NSData+Git.m */; }; 88F50F59132054D800584FBE /* GTBranch.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F50F56132054D800584FBE /* GTBranch.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88F50F5A132054D800584FBE /* GTBranch.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F50F57132054D800584FBE /* GTBranch.m */; }; 88F6D9D91320451F00CC0BA8 /* ObjectiveGit.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -248,9 +150,7 @@ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; AA046112134F4D2000DF526B /* GTOdbObject.h in Headers */ = {isa = PBXBuildFile; fileRef = AA046110134F4D2000DF526B /* GTOdbObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AA046113134F4D2000DF526B /* GTOdbObject.h in Headers */ = {isa = PBXBuildFile; fileRef = AA046110134F4D2000DF526B /* GTOdbObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; AA046114134F4D2000DF526B /* GTOdbObject.m in Sources */ = {isa = PBXBuildFile; fileRef = AA046111134F4D2000DF526B /* GTOdbObject.m */; }; - AA046115134F4D2000DF526B /* GTOdbObject.m in Sources */ = {isa = PBXBuildFile; fileRef = AA046111134F4D2000DF526B /* GTOdbObject.m */; }; BD441E08131ED0C300187010 /* GTReference.h in Headers */ = {isa = PBXBuildFile; fileRef = BD441E06131ED0C300187010 /* GTReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; BD441E09131ED0C300187010 /* GTReference.m in Sources */ = {isa = PBXBuildFile; fileRef = BD441E07131ED0C300187010 /* GTReference.m */; }; BD6B0411131496B8001909D0 /* GTTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6B040F131496B8001909D0 /* GTTree.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -275,47 +175,137 @@ BDFAF9C4131C1845000508BC /* GTIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = BDFAF9C2131C1845000508BC /* GTIndex.m */; }; BDFAF9C9131C1868000508BC /* GTIndexEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = BDFAF9C7131C1868000508BC /* GTIndexEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; BDFAF9CA131C1868000508BC /* GTIndexEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = BDFAF9C8131C1868000508BC /* GTIndexEntry.m */; }; - BE9AB96719659A9A0054F3D6 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9AB96619659A9A0054F3D6 /* XCTest.framework */; }; - BE9AB96919659A9E0054F3D6 /* libSpecta-OSX.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BE9AB96819659A9E0054F3D6 /* libSpecta-OSX.a */; }; D00F6816175D373C004DB9D6 /* GTReferenceSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D00F6815175D373C004DB9D6 /* GTReferenceSpec.m */; }; D015F7CA17F695E800AD5E1F /* GTRepository+Stashing.h in Headers */ = {isa = PBXBuildFile; fileRef = D015F7C817F695E800AD5E1F /* GTRepository+Stashing.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D015F7CB17F695E800AD5E1F /* GTRepository+Stashing.h in Headers */ = {isa = PBXBuildFile; fileRef = D015F7C817F695E800AD5E1F /* GTRepository+Stashing.h */; settings = {ATTRIBUTES = (Public, ); }; }; D015F7CC17F695E800AD5E1F /* GTRepository+Stashing.m in Sources */ = {isa = PBXBuildFile; fileRef = D015F7C917F695E800AD5E1F /* GTRepository+Stashing.m */; }; - D015F7CD17F695E800AD5E1F /* GTRepository+Stashing.m in Sources */ = {isa = PBXBuildFile; fileRef = D015F7C917F695E800AD5E1F /* GTRepository+Stashing.m */; }; D015F7D517F6965400AD5E1F /* GTRepositoryStashingSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D015F7D417F6965400AD5E1F /* GTRepositoryStashingSpec.m */; }; + D019778A19F8307600F523DA /* ObjectiveGit.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */; }; + D01B6F1419F82F6000D411BC /* git2.h in Headers */ = {isa = PBXBuildFile; fileRef = 79262F8A13C69B1600A4B1EA /* git2.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F1519F82F7B00D411BC /* NSData+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C2266131459E700992935 /* NSData+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F1619F82F7B00D411BC /* NSData+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C2267131459E700992935 /* NSData+Git.m */; }; + D01B6F1719F82F7B00D411BC /* NSError+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = BDE4C060130EFE2C00851650 /* NSError+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F1819F82F7B00D411BC /* NSError+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BDE4C061130EFE2C00851650 /* NSError+Git.m */; }; + D01B6F1919F82F7B00D411BC /* NSString+Git.h in Headers */ = {isa = PBXBuildFile; fileRef = 55C8057213874CDF004DCB0F /* NSString+Git.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F1A19F82F7B00D411BC /* NSString+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8057313874CDF004DCB0F /* NSString+Git.m */; }; + D01B6F1B19F82F7B00D411BC /* NSDate+GTTimeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B1E7EC1703522100D0814D /* NSDate+GTTimeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F1C19F82F7B00D411BC /* NSDate+GTTimeAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B1E7ED1703522100D0814D /* NSDate+GTTimeAdditions.m */; }; + D01B6F1D19F82F7B00D411BC /* NSArray+StringArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA6F17B4791A009B0EBD /* NSArray+StringArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F1E19F82F7B00D411BC /* NSArray+StringArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA7017B4791A009B0EBD /* NSArray+StringArray.m */; }; + D01B6F1F19F82F8700D411BC /* GTRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = BDE4C062130EFE2C00851650 /* GTRepository.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2019F82F8700D411BC /* GTRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = BDE4C063130EFE2C00851650 /* GTRepository.m */; }; + D01B6F2119F82F8700D411BC /* GTRepository+Status.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA6117B45A78009B0EBD /* GTRepository+Status.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2219F82F8700D411BC /* GTRepository+Status.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA6217B45A78009B0EBD /* GTRepository+Status.m */; }; + D01B6F2319F82F8700D411BC /* GTRepository+Reset.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BC0E4E18EF4F3600C7D0E6 /* GTRepository+Reset.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2419F82F8700D411BC /* GTRepository+Reset.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BC0E4F18EF4F3600C7D0E6 /* GTRepository+Reset.m */; }; + D01B6F2519F82F8700D411BC /* GTStatusDelta.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA5A17B45213009B0EBD /* GTStatusDelta.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2619F82F8700D411BC /* GTStatusDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 30DCBA5B17B45213009B0EBD /* GTStatusDelta.m */; }; + D01B6F2719F82F8700D411BC /* GTRepository+Stashing.h in Headers */ = {isa = PBXBuildFile; fileRef = D015F7C817F695E800AD5E1F /* GTRepository+Stashing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2819F82F8700D411BC /* GTRepository+Stashing.m in Sources */ = {isa = PBXBuildFile; fileRef = D015F7C917F695E800AD5E1F /* GTRepository+Stashing.m */; }; + D01B6F2919F82F8700D411BC /* GTRepository+Committing.h in Headers */ = {isa = PBXBuildFile; fileRef = 88746CC217FA1C950005888A /* GTRepository+Committing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2A19F82F8700D411BC /* GTRepository+Committing.m in Sources */ = {isa = PBXBuildFile; fileRef = 88746CC317FA1C950005888A /* GTRepository+Committing.m */; }; + D01B6F2B19F82F8700D411BC /* GTRepository+RemoteOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DFFB159183AA8D600D1565E /* GTRepository+RemoteOperations.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2C19F82F8700D411BC /* GTRepository+RemoteOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DFFB15A183AA8D600D1565E /* GTRepository+RemoteOperations.m */; }; + D01B6F2D19F82F8700D411BC /* GTEnumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD8AE6D13131B8800CB5D40 /* GTEnumerator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F2E19F82F8700D411BC /* GTEnumerator.m in Sources */ = {isa = PBXBuildFile; fileRef = BDD8AE6E13131B8800CB5D40 /* GTEnumerator.m */; }; + D01B6F2F19F82F8700D411BC /* GTObject.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C22A71314625800992935 /* GTObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3019F82F8700D411BC /* GTObject.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C22A81314625800992935 /* GTObject.m */; }; + D01B6F3119F82F8700D411BC /* GTCommit.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C22A41314609A00992935 /* GTCommit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3219F82F8700D411BC /* GTCommit.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C22A51314609A00992935 /* GTCommit.m */; }; + D01B6F3319F82F8700D411BC /* GTSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6C254313148DC900992935 /* GTSignature.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3419F82F8700D411BC /* GTSignature.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C254413148DC900992935 /* GTSignature.m */; }; + D01B6F3519F82F8700D411BC /* GTBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD627971318391200DE34D1 /* GTBlob.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3619F82F8700D411BC /* GTBlob.m in Sources */ = {isa = PBXBuildFile; fileRef = BDD627981318391200DE34D1 /* GTBlob.m */; }; + D01B6F3719F82F8700D411BC /* GTTree.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6B040F131496B8001909D0 /* GTTree.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3819F82F8700D411BC /* GTTree.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6B0410131496B8001909D0 /* GTTree.m */; }; + D01B6F3919F82F8700D411BC /* GTTreeEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = BD6B0415131496CC001909D0 /* GTTreeEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3A19F82F8700D411BC /* GTTreeEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6B0416131496CC001909D0 /* GTTreeEntry.m */; }; + D01B6F3B19F82F8700D411BC /* GTTreeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BE612861745EE3300266D8C /* GTTreeBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3C19F82F8700D411BC /* GTTreeBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BE612871745EE3300266D8C /* GTTreeBuilder.m */; }; + D01B6F3D19F82F8700D411BC /* GTTag.h in Headers */ = {isa = PBXBuildFile; fileRef = BDD62922131C03D600DE34D1 /* GTTag.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F3E19F82F8700D411BC /* GTTag.m in Sources */ = {isa = PBXBuildFile; fileRef = BDD62923131C03D600DE34D1 /* GTTag.m */; }; + D01B6F3F19F82F8700D411BC /* GTIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = BDFAF9C1131C1845000508BC /* GTIndex.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4019F82F8700D411BC /* GTIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = BDFAF9C2131C1845000508BC /* GTIndex.m */; }; + D01B6F4119F82F8700D411BC /* GTIndexEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = BDFAF9C7131C1868000508BC /* GTIndexEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4219F82F8700D411BC /* GTIndexEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = BDFAF9C8131C1868000508BC /* GTIndexEntry.m */; }; + D01B6F4319F82F8700D411BC /* GTReference.h in Headers */ = {isa = PBXBuildFile; fileRef = BD441E06131ED0C300187010 /* GTReference.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4419F82F8700D411BC /* GTReference.m in Sources */ = {isa = PBXBuildFile; fileRef = BD441E07131ED0C300187010 /* GTReference.m */; }; + D01B6F4519F82F8700D411BC /* GTBranch.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F50F56132054D800584FBE /* GTBranch.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4619F82F8700D411BC /* GTBranch.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F50F57132054D800584FBE /* GTBranch.m */; }; + D01B6F4719F82F8700D411BC /* GTObjectDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 55C8054C13861F34004DCB0F /* GTObjectDatabase.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4819F82F8700D411BC /* GTObjectDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8054D13861F34004DCB0F /* GTObjectDatabase.m */; }; + D01B6F4919F82F8700D411BC /* GTOdbObject.h in Headers */ = {isa = PBXBuildFile; fileRef = AA046110134F4D2000DF526B /* GTOdbObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4A19F82F8700D411BC /* GTOdbObject.m in Sources */ = {isa = PBXBuildFile; fileRef = AA046111134F4D2000DF526B /* GTOdbObject.m */; }; + D01B6F4B19F82F8700D411BC /* GTConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EB7E4B14AEBA600046FEA4 /* GTConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4C19F82F8700D411BC /* GTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EB7E4C14AEBA600046FEA4 /* GTConfiguration.m */; }; + D01B6F4D19F82F8700D411BC /* GTRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 883CD6A91600EBC600F57354 /* GTRemote.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F4E19F82F8700D411BC /* GTRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 883CD6AA1600EBC600F57354 /* GTRemote.m */; }; + D01B6F4F19F82FA600D411BC /* GTRepository+Blame.h in Headers */ = {isa = PBXBuildFile; fileRef = 20F43DE118A2F667007D3621 /* GTRepository+Blame.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5019F82FA600D411BC /* GTRepository+Blame.m in Sources */ = {isa = PBXBuildFile; fileRef = 20F43DE218A2F667007D3621 /* GTRepository+Blame.m */; }; + D01B6F5119F82FA600D411BC /* GTBlame.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D9510182A81E1004AF532 /* GTBlame.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5219F82FA600D411BC /* GTBlame.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D9511182A81E1004AF532 /* GTBlame.m */; }; + D01B6F5319F82FA600D411BC /* GTBlameHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D951A182AB25C004AF532 /* GTBlameHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5419F82FA600D411BC /* GTBlameHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D951B182AB25C004AF532 /* GTBlameHunk.m */; }; + D01B6F5519F82FA600D411BC /* GTReflog.h in Headers */ = {isa = PBXBuildFile; fileRef = 882154671714740500D76B76 /* GTReflog.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5619F82FA600D411BC /* GTReflog.m in Sources */ = {isa = PBXBuildFile; fileRef = 882154681714740500D76B76 /* GTReflog.m */; }; + D01B6F5719F82FA600D411BC /* GTReflogEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 8821547417147A5100D76B76 /* GTReflogEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5819F82FA600D411BC /* GTReflogEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 8821547517147A5200D76B76 /* GTReflogEntry.m */; }; + D01B6F5919F82FA600D411BC /* GTOID.h in Headers */ = {isa = PBXBuildFile; fileRef = 8821547B17147B3600D76B76 /* GTOID.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5A19F82FA600D411BC /* GTOID.m in Sources */ = {isa = PBXBuildFile; fileRef = 8821547C17147B3600D76B76 /* GTOID.m */; }; + D01B6F5B19F82FA600D411BC /* GTSubmodule.h in Headers */ = {isa = PBXBuildFile; fileRef = D09C2E341755F16200065E36 /* GTSubmodule.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5C19F82FA600D411BC /* GTSubmodule.m in Sources */ = {isa = PBXBuildFile; fileRef = D09C2E351755F16200065E36 /* GTSubmodule.m */; }; + D01B6F5D19F82FA600D411BC /* GTCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D79C0EC17DF9F4D00997DE4 /* GTCredential.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F5E19F82FA600D411BC /* GTCredential.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D79C0ED17DF9F4D00997DE4 /* GTCredential.m */; }; + D01B6F5F19F82FA600D411BC /* GTFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 880EE65F18AE700500B82455 /* GTFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6019F82FA600D411BC /* GTFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 880EE66018AE700500B82455 /* GTFilter.m */; }; + D01B6F6119F82FA600D411BC /* GTFilterSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 886E622818AEBF75000611A0 /* GTFilterSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6219F82FA600D411BC /* GTFilterSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 886E622918AEBF75000611A0 /* GTFilterSource.m */; }; + D01B6F6319F82FA600D411BC /* GTFilterList.h in Headers */ = {isa = PBXBuildFile; fileRef = D0CE551E18B6C58F008EB8E0 /* GTFilterList.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6419F82FA600D411BC /* GTFilterList.m in Sources */ = {isa = PBXBuildFile; fileRef = D0CE551F18B6C58F008EB8E0 /* GTFilterList.m */; }; + D01B6F6519F82FA600D411BC /* GTRepository+Attributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 88E352FE1982E9160051001F /* GTRepository+Attributes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6619F82FA600D411BC /* GTRepository+Attributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 88E352FF1982E9160051001F /* GTRepository+Attributes.m */; }; + D01B6F6719F82FA600D411BC /* GTFetchHeadEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EEB519F199D62B9001D72C0 /* GTFetchHeadEntry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6819F82FA600D411BC /* GTFetchHeadEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEB51A0199D62B9001D72C0 /* GTFetchHeadEntry.m */; }; + D01B6F6B19F82FB300D411BC /* GTDiff.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A3D6521667F11C00C49A39 /* GTDiff.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6C19F82FB300D411BC /* GTDiff.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A3D6531667F11C00C49A39 /* GTDiff.m */; }; + D01B6F6D19F82FB300D411BC /* GTDiffFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8691668E48500CE3409 /* GTDiffFile.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F6E19F82FB300D411BC /* GTDiffFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D86A1668E48500CE3409 /* GTDiffFile.m */; }; + D01B6F6F19F82FB300D411BC /* GTDiffHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D86F1668E78500CE3409 /* GTDiffHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F7019F82FB300D411BC /* GTDiffHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D8701668E78500CE3409 /* GTDiffHunk.m */; }; + D01B6F7119F82FB300D411BC /* GTDiffDelta.h in Headers */ = {isa = PBXBuildFile; fileRef = 3011D8751668F29600CE3409 /* GTDiffDelta.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F7219F82FB300D411BC /* GTDiffDelta.m in Sources */ = {isa = PBXBuildFile; fileRef = 3011D8761668F29600CE3409 /* GTDiffDelta.m */; }; + D01B6F7319F82FB300D411BC /* GTDiffLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 30FDC07D16835A8100654BF0 /* GTDiffLine.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F7419F82FB300D411BC /* GTDiffLine.m in Sources */ = {isa = PBXBuildFile; fileRef = 30FDC07E16835A8100654BF0 /* GTDiffLine.m */; }; + D01B6F7519F82FB300D411BC /* GTDiffPatch.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B579F18BFFF07007124F4 /* GTDiffPatch.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D01B6F7619F82FB300D411BC /* GTDiffPatch.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B57A018BFFF07007124F4 /* GTDiffPatch.m */; }; D01EFDA0195DEF2200838D24 /* NSDataGitSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D01EFD9F195DEF2200838D24 /* NSDataGitSpec.m */; }; D021DF4F1806899000934E32 /* NSArray+StringArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA6F17B4791A009B0EBD /* NSArray+StringArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D021DF501806899200934E32 /* NSArray+StringArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 30DCBA6F17B4791A009B0EBD /* NSArray+StringArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; D03B07F71965DAB0009E5624 /* NSData+Git.m in Sources */ = {isa = PBXBuildFile; fileRef = BD6C2267131459E700992935 /* NSData+Git.m */; }; D03B57A118BFFF07007124F4 /* GTDiffPatch.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B579F18BFFF07007124F4 /* GTDiffPatch.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D03B57A218BFFF07007124F4 /* GTDiffPatch.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B579F18BFFF07007124F4 /* GTDiffPatch.h */; settings = {ATTRIBUTES = (Public, ); }; }; D03B57A418BFFF07007124F4 /* GTDiffPatch.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B57A018BFFF07007124F4 /* GTDiffPatch.m */; }; - D03B57A518BFFF07007124F4 /* GTDiffPatch.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B57A018BFFF07007124F4 /* GTDiffPatch.m */; }; D03B7C411756AB370034A610 /* GTSubmoduleSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B7C401756AB370034A610 /* GTSubmoduleSpec.m */; }; D040AF70177B9779001AD9EB /* GTOIDSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D040AF6F177B9779001AD9EB /* GTOIDSpec.m */; }; D040AF78177B9A9E001AD9EB /* GTSignatureSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D040AF77177B9A9E001AD9EB /* GTSignatureSpec.m */; }; + D05FC5E219FAD039008C9348 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A1F2FD317C6A8F3003DFADE /* libcrypto.a */; }; + D05FC5E319FAD03C008C9348 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A1F2FD417C6A8F3003DFADE /* libssl.a */; }; + D05FC5E419FAD040008C9348 /* libssh2-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A502B8617D6892D00BAF4A5 /* libssh2-ios.a */; }; D06D9E011755D10000558C17 /* GTEnumeratorSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D06D9E001755D10000558C17 /* GTEnumeratorSpec.m */; }; D0751CD918BE520400134314 /* GTFilterListSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D0751CD818BE520400134314 /* GTFilterListSpec.m */; }; D09C2E361755F16200065E36 /* GTSubmodule.h in Headers */ = {isa = PBXBuildFile; fileRef = D09C2E341755F16200065E36 /* GTSubmodule.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D09C2E371755F16200065E36 /* GTSubmodule.h in Headers */ = {isa = PBXBuildFile; fileRef = D09C2E341755F16200065E36 /* GTSubmodule.h */; settings = {ATTRIBUTES = (Public, ); }; }; D09C2E381755F16200065E36 /* GTSubmodule.m in Sources */ = {isa = PBXBuildFile; fileRef = D09C2E351755F16200065E36 /* GTSubmodule.m */; }; - D09C2E391755F16200065E36 /* GTSubmodule.m in Sources */ = {isa = PBXBuildFile; fileRef = D09C2E351755F16200065E36 /* GTSubmodule.m */; }; D09C2E51175602A500065E36 /* fixtures.zip in Resources */ = {isa = PBXBuildFile; fileRef = D09C2E50175602A500065E36 /* fixtures.zip */; }; + D0A0128A19F98475007F1914 /* Quick.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0A0128819F98475007F1914 /* Quick.framework */; }; + D0A0128C19F9853D007F1914 /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0A0128B19F9853D007F1914 /* Nimble.framework */; }; + D0A0129519F99EF8007F1914 /* NSDate+GTTimeAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B1E7EC1703522100D0814D /* NSDate+GTTimeAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D0A0129719F9A660007F1914 /* SwiftSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0A0129619F9A660007F1914 /* SwiftSpec.swift */; }; D0AC906C172F941F00347DC4 /* GTRepositorySpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D0AC906B172F941F00347DC4 /* GTRepositorySpec.m */; }; D0CE552018B6C58F008EB8E0 /* GTFilterList.h in Headers */ = {isa = PBXBuildFile; fileRef = D0CE551E18B6C58F008EB8E0 /* GTFilterList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D0CE552118B6C58F008EB8E0 /* GTFilterList.h in Headers */ = {isa = PBXBuildFile; fileRef = D0CE551E18B6C58F008EB8E0 /* GTFilterList.h */; settings = {ATTRIBUTES = (Public, ); }; }; D0CE552318B6C58F008EB8E0 /* GTFilterList.m in Sources */ = {isa = PBXBuildFile; fileRef = D0CE551F18B6C58F008EB8E0 /* GTFilterList.m */; }; - D0CE552418B6C58F008EB8E0 /* GTFilterList.m in Sources */ = {isa = PBXBuildFile; fileRef = D0CE551F18B6C58F008EB8E0 /* GTFilterList.m */; }; + D0E0171519F9AD820019930C /* ObjectiveGit.h in Headers */ = {isa = PBXBuildFile; fileRef = 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */; settings = {ATTRIBUTES = (Public, ); }; }; D0F4E28A17C7F24200BBDE30 /* NSErrorGitSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F4E28917C7F24200BBDE30 /* NSErrorGitSpec.m */; }; - D4ACA56318DBA89300EBD899 /* libExpecta.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D4ACA56218DBA89300EBD899 /* libExpecta.a */; }; DD3D9512182A81E1004AF532 /* GTBlame.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D9510182A81E1004AF532 /* GTBlame.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD3D9513182A81E1004AF532 /* GTBlame.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D9511182A81E1004AF532 /* GTBlame.m */; }; DD3D951C182AB25C004AF532 /* GTBlameHunk.h in Headers */ = {isa = PBXBuildFile; fileRef = DD3D951A182AB25C004AF532 /* GTBlameHunk.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD3D951D182AB25C004AF532 /* GTBlameHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D951B182AB25C004AF532 /* GTBlameHunk.m */; }; - DD3D951E182AB3BD004AF532 /* GTBlame.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D9511182A81E1004AF532 /* GTBlame.m */; }; - DD3D9520182AB3C4004AF532 /* GTBlameHunk.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3D951B182AB25C004AF532 /* GTBlameHunk.m */; }; - E9FFC6BF1577CC8300A9E736 /* GTConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 88EB7E4C14AEBA600046FEA4 /* GTConfiguration.m */; }; - E9FFC6C01577CC8A00A9E736 /* GTConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EB7E4B14AEBA600046FEA4 /* GTConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -347,19 +337,19 @@ remoteGlobalIDString = 8DC2EF4F0486A6940098B216; remoteInfo = ObjectiveGit; }; - D0A330F716027F4900A616FA /* PBXContainerItemProxy */ = { + D019779619F8335100F523DA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = D0A330ED16027F1E00A616FA; - remoteInfo = libgit2; + remoteGlobalIDString = D0A330F216027F3600A616FA; + remoteInfo = "libgit2-iOS"; }; - D0A330F916027F4D00A616FA /* PBXContainerItemProxy */ = { + D0A330F716027F4900A616FA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = D0A330F216027F3600A616FA; - remoteInfo = "libgit2-iOS"; + remoteGlobalIDString = D0A330ED16027F1E00A616FA; + remoteInfo = libgit2; }; /* End PBXContainerItemProxy section */ @@ -378,13 +368,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 04DB4645133AB57600D9C624 /* libObjectiveGit-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libObjectiveGit-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 04DB4671133AB5FE00D9C624 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 188DC01817FC1571007350CD /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 200578C418932A82001C06C3 /* GTBlameSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlameSpec.m; sourceTree = ""; }; 2089E43B17D9A58000F451DA /* GTTagSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTTagSpec.m; sourceTree = ""; }; 20F43DE118A2F667007D3621 /* GTRepository+Blame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Blame.h"; sourceTree = ""; }; @@ -414,7 +399,6 @@ 30DCBA7017B4791A009B0EBD /* NSArray+StringArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+StringArray.m"; sourceTree = ""; }; 30FDC07D16835A8100654BF0 /* GTDiffLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTDiffLine.h; sourceTree = ""; }; 30FDC07E16835A8100654BF0 /* GTDiffLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTDiffLine.m; sourceTree = ""; }; - 32DBCF5E0370ADEE00C91783 /* ObjectiveGitFramework_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectiveGitFramework_Prefix.pch; sourceTree = ""; }; 4D103ADC1819CFAA0029DB24 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; }; 4D12323F178E009E0048F785 /* GTRepositoryCommittingSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRepositoryCommittingSpec.m; sourceTree = ""; }; 4D1C40D7182C006D00BE2960 /* GTBlobSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlobSpec.m; sourceTree = ""; }; @@ -436,7 +420,7 @@ 6A1F2FD317C6A8F3003DFADE /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = "External/ios-openssl/lib/libcrypto.a"; sourceTree = ""; }; 6A1F2FD417C6A8F3003DFADE /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = "External/ios-openssl/lib/libssl.a"; sourceTree = ""; }; 6A3C60A017D5987600382DFF /* update_libssh2_ios */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = update_libssh2_ios; path = script/update_libssh2_ios; sourceTree = SOURCE_ROOT; }; - 6A502B8617D6892D00BAF4A5 /* libssh2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssh2.a; path = "External/libssh2-ios/lib/libssh2.a"; sourceTree = ""; }; + 6A502B8617D6892D00BAF4A5 /* libssh2-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libssh2-ios.a"; path = "External/libssh2-ios/lib/libssh2-ios.a"; sourceTree = ""; }; 6EEB519F199D62B9001D72C0 /* GTFetchHeadEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTFetchHeadEntry.h; sourceTree = ""; }; 6EEB51A0199D62B9001D72C0 /* GTFetchHeadEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTFetchHeadEntry.m; sourceTree = ""; }; 79262F0E13C697BE00A4B1EA /* git2 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = git2; path = External/libgit2/include/git2; sourceTree = ""; }; @@ -459,6 +443,8 @@ 883CD6A91600EBC600F57354 /* GTRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTRemote.h; sourceTree = ""; }; 883CD6AA1600EBC600F57354 /* GTRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRemote.m; sourceTree = ""; }; 883CD6AE1600F01000F57354 /* GTConfiguration+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GTConfiguration+Private.h"; sourceTree = ""; }; + 884C8A3619FF4B4D0017E98D /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libz.dylib; sourceTree = DEVELOPER_DIR; }; + 884C8A3819FF4B6D0017E98D /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/lib/libiconv.dylib; sourceTree = DEVELOPER_DIR; }; 886E622818AEBF75000611A0 /* GTFilterSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTFilterSource.h; sourceTree = ""; }; 886E622918AEBF75000611A0 /* GTFilterSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTFilterSource.m; sourceTree = ""; }; 886E623618AECD86000611A0 /* GTFilterSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTFilterSpec.m; sourceTree = ""; }; @@ -467,9 +453,10 @@ 88746CC317FA1C950005888A /* GTRepository+Committing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTRepository+Committing.m"; sourceTree = ""; }; 887DAFF615CB1C8000F30D0D /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 88948AC81779243600809CDA /* GTObjectDatabaseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTObjectDatabaseSpec.m; sourceTree = ""; }; + 889923F919FF5DD40092A9A6 /* git2 */ = {isa = PBXFileReference; lastKnownFileType = folder; name = git2; path = External/libgit2/include/git2; sourceTree = ""; }; 88A994B916FCE7D400402C7B /* GTBranchSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBranchSpec.m; sourceTree = ""; }; - 88A994C916FCED1D00402C7B /* GTTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTTestCase.h; sourceTree = ""; }; - 88A994CA16FCED1D00402C7B /* GTTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTTestCase.m; sourceTree = ""; }; + 88A994C916FCED1D00402C7B /* QuickSpec+GTFixtures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "QuickSpec+GTFixtures.h"; sourceTree = ""; }; + 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "QuickSpec+GTFixtures.m"; sourceTree = ""; }; 88BC0E4E18EF4F3600C7D0E6 /* GTRepository+Reset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Reset.h"; sourceTree = ""; }; 88BC0E4F18EF4F3600C7D0E6 /* GTRepository+Reset.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTRepository+Reset.m"; sourceTree = ""; }; 88C0BC5817038CF3009E99AA /* GTConfigurationSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTConfigurationSpec.m; sourceTree = ""; }; @@ -478,17 +465,13 @@ 88E353051982EA6B0051001F /* GTRepositoryAttributesSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRepositoryAttributesSpec.m; sourceTree = ""; }; 88EB7E4B14AEBA600046FEA4 /* GTConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTConfiguration.h; sourceTree = ""; }; 88EB7E4C14AEBA600046FEA4 /* GTConfiguration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTConfiguration.m; sourceTree = ""; }; - 88F05A6B16011E5400B7AD1D /* ObjectiveGitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ObjectiveGitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 88F05A7716011E5400B7AD1D /* ObjectiveGitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ObjectiveGitTests-Info.plist"; sourceTree = ""; }; - 88F05A7916011E5400B7AD1D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 88F05A7E16011E5400B7AD1D /* ObjectiveGitTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ObjectiveGitTests-Prefix.pch"; sourceTree = ""; }; + 88F05A6B16011E5400B7AD1D /* ObjectiveGit-MacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ObjectiveGit-MacTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 88F05AA416011FFD00B7AD1D /* GTCommitSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTCommitSpec.m; sourceTree = ""; }; - 88F05AA816011FFD00B7AD1D /* GTObjectTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTObjectTest.m; sourceTree = ""; }; - 88F05AAF16011FFD00B7AD1D /* ObjectiveGitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ObjectiveGitTests-Info.plist"; sourceTree = ""; }; - 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ObjectiveGit.m; path = Classes/ObjectiveGit.m; sourceTree = ""; }; + 88F05AA816011FFD00B7AD1D /* GTObjectSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTObjectSpec.m; sourceTree = ""; }; + 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjectiveGit.m; sourceTree = ""; }; 88F50F56132054D800584FBE /* GTBranch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTBranch.h; sourceTree = ""; }; 88F50F57132054D800584FBE /* GTBranch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = GTBranch.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = ObjectiveGit.h; path = Classes/ObjectiveGit.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ObjectiveGit.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* ObjectiveGit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjectiveGit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; AA046110134F4D2000DF526B /* GTOdbObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTOdbObject.h; sourceTree = ""; }; @@ -514,9 +497,6 @@ BDD8AB01130F01AB00CB5D40 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; BDD8AE6D13131B8800CB5D40 /* GTEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTEnumerator.h; sourceTree = ""; }; BDD8AE6E13131B8800CB5D40 /* GTEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = GTEnumerator.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - BDD9C3FB133BA604003708E7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - BDD9C3FD133BA604003708E7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - BDD9C3FF133BA604003708E7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; BDE4C060130EFE2C00851650 /* NSError+Git.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSError+Git.h"; sourceTree = ""; }; BDE4C061130EFE2C00851650 /* NSError+Git.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSError+Git.m"; sourceTree = ""; }; BDE4C062130EFE2C00851650 /* GTRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTRepository.h; sourceTree = ""; }; @@ -525,12 +505,14 @@ BDFAF9C2131C1845000508BC /* GTIndex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTIndex.m; sourceTree = ""; }; BDFAF9C7131C1868000508BC /* GTIndexEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTIndexEntry.h; sourceTree = ""; }; BDFAF9C8131C1868000508BC /* GTIndexEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = GTIndexEntry.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; - BE9AB96619659A9A0054F3D6 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - BE9AB96819659A9E0054F3D6 /* libSpecta-OSX.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libSpecta-OSX.a"; path = "ObjectiveGitTests/specta/build/Debug/libSpecta-OSX.a"; sourceTree = ""; }; D00F6815175D373C004DB9D6 /* GTReferenceSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTReferenceSpec.m; sourceTree = ""; }; D015F7C817F695E800AD5E1F /* GTRepository+Stashing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Stashing.h"; sourceTree = ""; }; D015F7C917F695E800AD5E1F /* GTRepository+Stashing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTRepository+Stashing.m"; sourceTree = ""; }; D015F7D417F6965400AD5E1F /* GTRepositoryStashingSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRepositoryStashingSpec.m; sourceTree = ""; }; + D019778B19F830CC00F523DA /* Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Framework.xcconfig; sourceTree = ""; }; + D019778C19F830D100F523DA /* iOS-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "iOS-Framework.xcconfig"; sourceTree = ""; }; + D01B6ED319F82E2000D411BC /* ObjectiveGit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjectiveGit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D01B6F0F19F82F3C00D411BC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D01EFD9F195DEF2200838D24 /* NSDataGitSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDataGitSpec.m; sourceTree = ""; }; D01EFDB6195E021800838D24 /* GTDiff+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GTDiff+Private.h"; sourceTree = ""; }; D03B579F18BFFF07007124F4 /* GTDiffPatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTDiffPatch.h; sourceTree = ""; }; @@ -543,6 +525,9 @@ D09C2E341755F16200065E36 /* GTSubmodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTSubmodule.h; sourceTree = ""; }; D09C2E351755F16200065E36 /* GTSubmodule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTSubmodule.m; sourceTree = ""; }; D09C2E50175602A500065E36 /* fixtures.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; name = fixtures.zip; path = fixtures/fixtures.zip; sourceTree = ""; }; + D0A0128819F98475007F1914 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D0A0128B19F9853D007F1914 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D0A0129619F9A660007F1914 /* SwiftSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSpec.swift; sourceTree = ""; }; D0A463D617E57C45000F5021 /* Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Common.xcconfig; sourceTree = ""; }; D0A463D817E57C45000F5021 /* Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; D0A463D917E57C45000F5021 /* Profile.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Profile.xcconfig; sourceTree = ""; }; @@ -563,9 +548,6 @@ D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Mac-StaticLibrary.xcconfig"; sourceTree = ""; }; D0D8186C174421EB00995A2E /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; path = README.md; sourceTree = ""; }; D0F4E28917C7F24200BBDE30 /* NSErrorGitSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSErrorGitSpec.m; sourceTree = ""; }; - D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; - D4ACA56018DBA88E00EBD899 /* libSpecta.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libSpecta.a; path = specta/build/Debug/libSpecta.a; sourceTree = ""; }; - D4ACA56218DBA89300EBD899 /* libExpecta.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libExpecta.a; path = expecta/build/Debug/libExpecta.a; sourceTree = ""; }; DD3D9510182A81E1004AF532 /* GTBlame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTBlame.h; sourceTree = ""; }; DD3D9511182A81E1004AF532 /* GTBlame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTBlame.m; sourceTree = ""; }; DD3D951A182AB25C004AF532 /* GTBlameHunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTBlameHunk.h; sourceTree = ""; }; @@ -575,23 +557,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 04DB4643133AB57600D9C624 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6A1F2FD517C6A8F3003DFADE /* libcrypto.a in Frameworks */, - 6A1F2FD617C6A8F3003DFADE /* libssl.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 88F05A6716011E5400B7AD1D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D0A0128A19F98475007F1914 /* Quick.framework in Frameworks */, 88F05A9E16011F6E00B7AD1D /* ObjectiveGit.framework in Frameworks */, - BE9AB96719659A9A0054F3D6 /* XCTest.framework in Frameworks */, - BE9AB96919659A9E0054F3D6 /* libSpecta-OSX.a in Frameworks */, - D4ACA56318DBA89300EBD899 /* libExpecta.a in Frameworks */, + D0A0128C19F9853D007F1914 /* Nimble.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -605,6 +577,18 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D01B6ECF19F82E2000D411BC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 884C8A3919FF4B6D0017E98D /* libiconv.dylib in Frameworks */, + 884C8A3719FF4B4D0017E98D /* libz.dylib in Frameworks */, + D05FC5E319FAD03C008C9348 /* libssl.a in Frameworks */, + D05FC5E219FAD039008C9348 /* libcrypto.a in Frameworks */, + D05FC5E419FAD040008C9348 /* libssh2-ios.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -612,8 +596,8 @@ isa = PBXGroup; children = ( 8DC2EF5B0486A6940098B216 /* ObjectiveGit.framework */, - 04DB4645133AB57600D9C624 /* libObjectiveGit-iOS.a */, - 88F05A6B16011E5400B7AD1D /* ObjectiveGitTests.xctest */, + 88F05A6B16011E5400B7AD1D /* ObjectiveGit-MacTests.xctest */, + D01B6ED319F82E2000D411BC /* ObjectiveGit.framework */, ); name = Products; sourceTree = ""; @@ -621,12 +605,8 @@ 0867D691FE84028FC02AAC07 /* ObjectiveGitFramework */ = { isa = PBXGroup; children = ( - BE9AB96819659A9E0054F3D6 /* libSpecta-OSX.a */, - BE9AB96619659A9A0054F3D6 /* XCTest.framework */, BDD8AB01130F01AB00CB5D40 /* README.md */, - 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */, - 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */, - BDE4C05E130EFE2C00851650 /* Classes */, + BDE4C05E130EFE2C00851650 /* ObjectiveGit */, 88F05A7516011E5400B7AD1D /* ObjectiveGitTests */, 32C88DFF0371C24200C91783 /* Other Sources */, 089C1665FE841158C02AAC07 /* Resources */, @@ -644,48 +624,29 @@ children = ( 4D8DADBE181A7D9F001B1202 /* libgit2 */, 306123A817EA5261006591D4 /* extobjc */, - 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */, - 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */, - ); - name = "External Frameworks and Libraries"; - sourceTree = ""; - }; - 089C1665FE841158C02AAC07 /* Resources */ = { - isa = PBXGroup; - children = ( - 8DC2EF5A0486A6940098B216 /* Info.plist */, - 089C1666FE841158C02AAC07 /* InfoPlist.strings */, - ); - name = Resources; - sourceTree = ""; - }; - 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( 4D103ADC1819CFAA0029DB24 /* libiconv.dylib */, - 188DC01817FC1571007350CD /* libz.dylib */, 8803DA861313145700E6E818 /* libz.dylib */, - 04DB4671133AB5FE00D9C624 /* libz.dylib */, + 884C8A3619FF4B4D0017E98D /* libz.dylib */, + 884C8A3819FF4B6D0017E98D /* libiconv.dylib */, 6A1F2FD317C6A8F3003DFADE /* libcrypto.a */, 6A1F2FD417C6A8F3003DFADE /* libssl.a */, - 6A502B8617D6892D00BAF4A5 /* libssh2.a */, + 6A502B8617D6892D00BAF4A5 /* libssh2-ios.a */, 887DAFF615CB1C8000F30D0D /* Security.framework */, 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */, + D0A0128819F98475007F1914 /* Quick.framework */, + D0A0128B19F9853D007F1914 /* Nimble.framework */, + 889923F919FF5DD40092A9A6 /* git2 */, ); - name = "Linked Frameworks"; + name = "External Frameworks and Libraries"; sourceTree = ""; }; - 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = { + 089C1665FE841158C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( - 0867D6A5FE840307C02AAC07 /* AppKit.framework */, - D2F7E79907B2D74100F64583 /* CoreData.framework */, - BDD9C3FB133BA604003708E7 /* CoreGraphics.framework */, - 0867D69BFE84028FC02AAC07 /* Foundation.framework */, - BDD9C3FD133BA604003708E7 /* Foundation.framework */, - BDD9C3FF133BA604003708E7 /* UIKit.framework */, - ); - name = "Other Frameworks"; + 8DC2EF5A0486A6940098B216 /* Info.plist */, + 089C1666FE841158C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; sourceTree = ""; }; 306123A817EA5261006591D4 /* extobjc */ = { @@ -722,7 +683,6 @@ 32C88DFF0371C24200C91783 /* Other Sources */ = { isa = PBXGroup; children = ( - 32DBCF5E0370ADEE00C91783 /* ObjectiveGitFramework_Prefix.pch */, 79262F0E13C697BE00A4B1EA /* git2 */, 79262F8A13C69B1600A4B1EA /* git2.h */, ); @@ -740,7 +700,7 @@ 30865A90167F503400B1AB6E /* GTDiffSpec.m */, D06D9E001755D10000558C17 /* GTEnumeratorSpec.m */, 8832811E173D8816006D7DCF /* GTIndexSpec.m */, - 88F05AA816011FFD00B7AD1D /* GTObjectTest.m */, + 88F05AA816011FFD00B7AD1D /* GTObjectSpec.m */, D00F6815175D373C004DB9D6 /* GTReferenceSpec.m */, 88215482171499BE00D76B76 /* GTReflogSpec.m */, 4DBA4A3117DA73CE006CD5F5 /* GTRemoteSpec.m */, @@ -772,22 +732,20 @@ 88F05A7616011E5400B7AD1D /* Supporting Files */ = { isa = PBXGroup; children = ( - 88A994C916FCED1D00402C7B /* GTTestCase.h */, - 88A994CA16FCED1D00402C7B /* GTTestCase.m */, + D01B6F0F19F82F3C00D411BC /* Info.plist */, + 88A994C916FCED1D00402C7B /* QuickSpec+GTFixtures.h */, + 88A994CA16FCED1D00402C7B /* QuickSpec+GTFixtures.m */, + D0A0129619F9A660007F1914 /* SwiftSpec.swift */, D09C2E50175602A500065E36 /* fixtures.zip */, - D4ACA56218DBA89300EBD899 /* libExpecta.a */, - D4ACA56018DBA88E00EBD899 /* libSpecta.a */, - 88F05A7716011E5400B7AD1D /* ObjectiveGitTests-Info.plist */, - 88F05A7816011E5400B7AD1D /* InfoPlist.strings */, - 88F05A7E16011E5400B7AD1D /* ObjectiveGitTests-Prefix.pch */, - 88F05AAF16011FFD00B7AD1D /* ObjectiveGitTests-Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; - BDE4C05E130EFE2C00851650 /* Classes */ = { + BDE4C05E130EFE2C00851650 /* ObjectiveGit */ = { isa = PBXGroup; children = ( + 88F6D9D81320451F00CC0BA8 /* ObjectiveGit.h */, + 88F05AC51601209A00B7AD1D /* ObjectiveGit.m */, BDE4C05F130EFE2C00851650 /* Categories */, BDE4C062130EFE2C00851650 /* GTRepository.h */, 4DE864341794A37E00371A65 /* GTRepository+Private.h */, @@ -870,7 +828,7 @@ 6EEB519F199D62B9001D72C0 /* GTFetchHeadEntry.h */, 6EEB51A0199D62B9001D72C0 /* GTFetchHeadEntry.m */, ); - path = Classes; + path = ObjectiveGit; sourceTree = ""; }; BDE4C05F130EFE2C00851650 /* Categories */ = { @@ -915,6 +873,7 @@ isa = PBXGroup; children = ( D0A463DD17E57C45000F5021 /* Application.xcconfig */, + D019778B19F830CC00F523DA /* Framework.xcconfig */, D0A463DE17E57C45000F5021 /* StaticLibrary.xcconfig */, ); path = Targets; @@ -937,6 +896,7 @@ children = ( D0D81863174421EB00995A2E /* iOS-Application.xcconfig */, D0D81864174421EB00995A2E /* iOS-Base.xcconfig */, + D019778C19F830D100F523DA /* iOS-Framework.xcconfig */, D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */, ); path = iOS; @@ -967,66 +927,6 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 04DB4641133AB57600D9C624 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 886E622B18AEBF75000611A0 /* GTFilterSource.h in Headers */, - 306123B217EA5261006591D4 /* metamacros.h in Headers */, - 3E0A23E5159E0FDB00A6068F /* GTObjectDatabase.h in Headers */, - 88BC0E5118EF4F3600C7D0E6 /* GTRepository+Reset.h in Headers */, - 04DB464E133AB5E200D9C624 /* NSError+Git.h in Headers */, - 55C8057F13875C62004DCB0F /* NSData+Git.h in Headers */, - 55C8058013875C6E004DCB0F /* NSString+Git.h in Headers */, - 04DB464F133AB5E200D9C624 /* GTRepository.h in Headers */, - 306123AD17EA5261006591D4 /* EXTScope.h in Headers */, - 04DB4652133AB5E200D9C624 /* GTEnumerator.h in Headers */, - 88E353011982E9160051001F /* GTRepository+Attributes.h in Headers */, - 04DB4653133AB5E200D9C624 /* GTTree.h in Headers */, - 5BE612891745EE3400266D8C /* GTTreeBuilder.h in Headers */, - D021DF501806899200934E32 /* NSArray+StringArray.h in Headers */, - 04DB4654133AB5E200D9C624 /* GTTreeEntry.h in Headers */, - 6E98A3CC199A89300048E067 /* GTRepository+RemoteOperations.h in Headers */, - 04DB4655133AB5E200D9C624 /* GTBlob.h in Headers */, - 04DB4656133AB5E200D9C624 /* GTTag.h in Headers */, - 04DB4657133AB5E200D9C624 /* GTIndex.h in Headers */, - 04DB4658133AB5E200D9C624 /* GTIndexEntry.h in Headers */, - D0CE552118B6C58F008EB8E0 /* GTFilterList.h in Headers */, - 04DB4659133AB5E200D9C624 /* GTReference.h in Headers */, - 04DB465A133AB5E200D9C624 /* ObjectiveGit.h in Headers */, - 04DB465B133AB5E200D9C624 /* GTCommit.h in Headers */, - 04DB465C133AB5E200D9C624 /* GTObject.h in Headers */, - 04DB465D133AB5E200D9C624 /* GTSignature.h in Headers */, - 04DB465E133AB5E200D9C624 /* GTBranch.h in Headers */, - AA046113134F4D2000DF526B /* GTOdbObject.h in Headers */, - D03B57A218BFFF07007124F4 /* GTDiffPatch.h in Headers */, - 880EE66218AE700500B82455 /* GTFilter.h in Headers */, - E9FFC6C01577CC8A00A9E736 /* GTConfiguration.h in Headers */, - 30DCBA5D17B45213009B0EBD /* GTStatusDelta.h in Headers */, - 30A3D6551667F11C00C49A39 /* GTDiff.h in Headers */, - 3011D86C1668E48500CE3409 /* GTDiffFile.h in Headers */, - 6A74CA3716A942C800E1A3C5 /* GTRemote.h in Headers */, - 3011D8721668E78500CE3409 /* GTDiffHunk.h in Headers */, - 30FDC08016835A8100654BF0 /* GTDiffLine.h in Headers */, - 8821547717147A5200D76B76 /* GTReflogEntry.h in Headers */, - 3011D8781668F29600CE3409 /* GTDiffDelta.h in Headers */, - 398F8AA6183111080071359D /* GTCredential.h in Headers */, - 88746CC517FA1C950005888A /* GTRepository+Committing.h in Headers */, - 30DCBA6417B45A78009B0EBD /* GTRepository+Status.h in Headers */, - 8821547E17147B3600D76B76 /* GTOID.h in Headers */, - 8821546A1714740500D76B76 /* GTReflog.h in Headers */, - 20F43DE418A2F668007D3621 /* GTRepository+Blame.h in Headers */, - 20702DAF18A1F38A009FB457 /* GTBlame.h in Headers */, - 20702DB118A1F38A009FB457 /* GTBlameHunk.h in Headers */, - 6A74CA3616A942C000E1A3C5 /* GTConfiguration+Private.h in Headers */, - 30B1E7EF1703522100D0814D /* NSDate+GTTimeAdditions.h in Headers */, - 6EEB51A3199D62CC001D72C0 /* GTFetchHeadEntry.h in Headers */, - D09C2E371755F16200065E36 /* GTSubmodule.h in Headers */, - D015F7CB17F695E800AD5E1F /* GTRepository+Stashing.h in Headers */, - 4DE864361794A37E00371A65 /* GTRepository+Private.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 8DC2EF500486A6940098B216 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1050,11 +950,11 @@ 88F6D9FA1320467100CC0BA8 /* GTCommit.h in Headers */, 88F6D9FB1320467500CC0BA8 /* GTObject.h in Headers */, AA046112134F4D2000DF526B /* GTOdbObject.h in Headers */, + D0A0129519F99EF8007F1914 /* NSDate+GTTimeAdditions.h in Headers */, 4DFFB15B183AA8D600D1565E /* GTRepository+RemoteOperations.h in Headers */, BDB2B1301386F34300C88D55 /* GTObjectDatabase.h in Headers */, 88F6D9FC1320467800CC0BA8 /* GTSignature.h in Headers */, 88F50F59132054D800584FBE /* GTBranch.h in Headers */, - 306123AC17EA5261006591D4 /* EXTScope.h in Headers */, 79262F8B13C69B1600A4B1EA /* git2.h in Headers */, 88EB7E4D14AEBA600046FEA4 /* GTConfiguration.h in Headers */, BDE4C064130EFE2C00851650 /* NSError+Git.h in Headers */, @@ -1079,39 +979,75 @@ 8821547617147A5200D76B76 /* GTReflogEntry.h in Headers */, 30DCBA5C17B45213009B0EBD /* GTStatusDelta.h in Headers */, 88746CC417FA1C950005888A /* GTRepository+Committing.h in Headers */, - 30B1E7EE1703522100D0814D /* NSDate+GTTimeAdditions.h in Headers */, D09C2E361755F16200065E36 /* GTSubmodule.h in Headers */, - 306123B117EA5261006591D4 /* metamacros.h in Headers */, - 4DE864351794A37E00371A65 /* GTRepository+Private.h in Headers */, 4D79C0EE17DF9F4D00997DE4 /* GTCredential.h in Headers */, - 4D79C0F717DFAA7100997DE4 /* GTCredential+Private.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D01B6ED019F82E2000D411BC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D01B6F3D19F82F8700D411BC /* GTTag.h in Headers */, + D01B6F4119F82F8700D411BC /* GTIndexEntry.h in Headers */, + D01B6F2319F82F8700D411BC /* GTRepository+Reset.h in Headers */, + D01B6F2D19F82F8700D411BC /* GTEnumerator.h in Headers */, + D01B6F5519F82FA600D411BC /* GTReflog.h in Headers */, + D01B6F3519F82F8700D411BC /* GTBlob.h in Headers */, + D01B6F4D19F82F8700D411BC /* GTRemote.h in Headers */, + D01B6F1519F82F7B00D411BC /* NSData+Git.h in Headers */, + D01B6F6119F82FA600D411BC /* GTFilterSource.h in Headers */, + D0E0171519F9AD820019930C /* ObjectiveGit.h in Headers */, + D01B6F4919F82F8700D411BC /* GTOdbObject.h in Headers */, + D01B6F3919F82F8700D411BC /* GTTreeEntry.h in Headers */, + D01B6F5B19F82FA600D411BC /* GTSubmodule.h in Headers */, + D01B6F4719F82F8700D411BC /* GTObjectDatabase.h in Headers */, + D01B6F2B19F82F8700D411BC /* GTRepository+RemoteOperations.h in Headers */, + D01B6F7319F82FB300D411BC /* GTDiffLine.h in Headers */, + D01B6F6B19F82FB300D411BC /* GTDiff.h in Headers */, + D01B6F3119F82F8700D411BC /* GTCommit.h in Headers */, + D01B6F2519F82F8700D411BC /* GTStatusDelta.h in Headers */, + D01B6F6519F82FA600D411BC /* GTRepository+Attributes.h in Headers */, + D01B6F2919F82F8700D411BC /* GTRepository+Committing.h in Headers */, + D01B6F4F19F82FA600D411BC /* GTRepository+Blame.h in Headers */, + D01B6F1719F82F7B00D411BC /* NSError+Git.h in Headers */, + D01B6F3319F82F8700D411BC /* GTSignature.h in Headers */, + D01B6F1919F82F7B00D411BC /* NSString+Git.h in Headers */, + D01B6F7519F82FB300D411BC /* GTDiffPatch.h in Headers */, + D01B6F3719F82F8700D411BC /* GTTree.h in Headers */, + D01B6F5D19F82FA600D411BC /* GTCredential.h in Headers */, + D01B6F5719F82FA600D411BC /* GTReflogEntry.h in Headers */, + D01B6F1F19F82F8700D411BC /* GTRepository.h in Headers */, + D01B6F2119F82F8700D411BC /* GTRepository+Status.h in Headers */, + D01B6F5919F82FA600D411BC /* GTOID.h in Headers */, + D01B6F6D19F82FB300D411BC /* GTDiffFile.h in Headers */, + D01B6F2F19F82F8700D411BC /* GTObject.h in Headers */, + D01B6F4B19F82F8700D411BC /* GTConfiguration.h in Headers */, + D01B6F6719F82FA600D411BC /* GTFetchHeadEntry.h in Headers */, + D01B6F5F19F82FA600D411BC /* GTFilter.h in Headers */, + D01B6F5319F82FA600D411BC /* GTBlameHunk.h in Headers */, + D01B6F6F19F82FB300D411BC /* GTDiffHunk.h in Headers */, + D01B6F4319F82F8700D411BC /* GTReference.h in Headers */, + D01B6F3F19F82F8700D411BC /* GTIndex.h in Headers */, + D01B6F2719F82F8700D411BC /* GTRepository+Stashing.h in Headers */, + D01B6F5119F82FA600D411BC /* GTBlame.h in Headers */, + D01B6F1D19F82F7B00D411BC /* NSArray+StringArray.h in Headers */, + D01B6F4519F82F8700D411BC /* GTBranch.h in Headers */, + D01B6F7119F82FB300D411BC /* GTDiffDelta.h in Headers */, + D01B6F3B19F82F8700D411BC /* GTTreeBuilder.h in Headers */, + D01B6F1B19F82F7B00D411BC /* NSDate+GTTimeAdditions.h in Headers */, + D01B6F6319F82FA600D411BC /* GTFilterList.h in Headers */, + 889923FB19FF5DD40092A9A6 /* git2 in Headers */, + D01B6F1419F82F6000D411BC /* git2.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 04DB4644133AB57600D9C624 /* ObjectiveGit-iOS */ = { + 88F05A6A16011E5400B7AD1D /* ObjectiveGit-MacTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 04DB464B133AB58900D9C624 /* Build configuration list for PBXNativeTarget "ObjectiveGit-iOS" */; - buildPhases = ( - 04DB4641133AB57600D9C624 /* Headers */, - 04DB4642133AB57600D9C624 /* Sources */, - 04DB4643133AB57600D9C624 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - D0A330FA16027F4D00A616FA /* PBXTargetDependency */, - ); - name = "ObjectiveGit-iOS"; - productName = "ObjectiveGit-iOS"; - productReference = 04DB4645133AB57600D9C624 /* libObjectiveGit-iOS.a */; - productType = "com.apple.product-type.library.static"; - }; - 88F05A6A16011E5400B7AD1D /* ObjectiveGitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 88F05A7F16011E5400B7AD1D /* Build configuration list for PBXNativeTarget "ObjectiveGitTests" */; + buildConfigurationList = 88F05A7F16011E5400B7AD1D /* Build configuration list for PBXNativeTarget "ObjectiveGit-MacTests" */; buildPhases = ( 88F05A6616011E5400B7AD1D /* Sources */, 88F05A6716011E5400B7AD1D /* Frameworks */, @@ -1122,32 +1058,50 @@ dependencies = ( 88F05AA016011F9000B7AD1D /* PBXTargetDependency */, ); - name = ObjectiveGitTests; + name = "ObjectiveGit-MacTests"; productName = ObjectiveGitTests; - productReference = 88F05A6B16011E5400B7AD1D /* ObjectiveGitTests.xctest */; + productReference = 88F05A6B16011E5400B7AD1D /* ObjectiveGit-MacTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 8DC2EF4F0486A6940098B216 /* ObjectiveGit */ = { + 8DC2EF4F0486A6940098B216 /* ObjectiveGit-Mac */ = { isa = PBXNativeTarget; - buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "ObjectiveGit" */; + buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "ObjectiveGit-Mac" */; buildPhases = ( - 8DC2EF500486A6940098B216 /* Headers */, - 79262F0F13C697BE00A4B1EA /* Copy git2 Headers */, + 8DC2EF540486A6940098B216 /* Sources */, 8DC2EF520486A6940098B216 /* Resources */, 8DC2EF560486A6940098B216 /* Frameworks */, - 8DC2EF540486A6940098B216 /* Sources */, + 79262F0F13C697BE00A4B1EA /* Copy git2 Headers */, + 8DC2EF500486A6940098B216 /* Headers */, ); buildRules = ( ); dependencies = ( D0A330F816027F4900A616FA /* PBXTargetDependency */, ); - name = ObjectiveGit; + name = "ObjectiveGit-Mac"; productInstallPath = "$(HOME)/Library/Frameworks"; productName = ObjectiveGitFramework; productReference = 8DC2EF5B0486A6940098B216 /* ObjectiveGit.framework */; productType = "com.apple.product-type.framework"; }; + D01B6ED219F82E2000D411BC /* ObjectiveGit-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = D01B6EE619F82E2000D411BC /* Build configuration list for PBXNativeTarget "ObjectiveGit-iOS" */; + buildPhases = ( + D01B6ECE19F82E2000D411BC /* Sources */, + D01B6ECF19F82E2000D411BC /* Frameworks */, + D01B6ED019F82E2000D411BC /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + D019779719F8335100F523DA /* PBXTargetDependency */, + ); + name = "ObjectiveGit-iOS"; + productName = ObjectiveGit; + productReference = D01B6ED319F82E2000D411BC /* ObjectiveGit.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -1157,6 +1111,11 @@ LastTestingUpgradeCheck = 0510; LastUpgradeCheck = 0510; ORGANIZATIONNAME = "GitHub, Inc"; + TargetAttributes = { + D01B6ED219F82E2000D411BC = { + CreatedOnToolsVersion = 6.1; + }; + }; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ObjectiveGitFramework" */; compatibilityVersion = "Xcode 3.2"; @@ -1174,9 +1133,9 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 8DC2EF4F0486A6940098B216 /* ObjectiveGit */, - 04DB4644133AB57600D9C624 /* ObjectiveGit-iOS */, - 88F05A6A16011E5400B7AD1D /* ObjectiveGitTests */, + 8DC2EF4F0486A6940098B216 /* ObjectiveGit-Mac */, + 88F05A6A16011E5400B7AD1D /* ObjectiveGit-MacTests */, + D01B6ED219F82E2000D411BC /* ObjectiveGit-iOS */, D0A330ED16027F1E00A616FA /* libgit2 */, D0A330F216027F3600A616FA /* libgit2-iOS */, 6A28265217C69CB400C6A948 /* OpenSSL-iOS */, @@ -1190,7 +1149,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 88F05AC41601204200B7AD1D /* InfoPlist.strings in Resources */, D09C2E51175602A500065E36 /* fixtures.zip in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1261,90 +1219,28 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 04DB4642133AB57600D9C624 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6A74CA3816A9432A00E1A3C5 /* ObjectiveGit.m in Sources */, - 88E353031982E9160051001F /* GTRepository+Attributes.m in Sources */, - 886E622D18AEBF75000611A0 /* GTFilterSource.m in Sources */, - 6A74CA3416A942AA00E1A3C5 /* NSData+Git.m in Sources */, - 6A74CA3216A9429700E1A3C5 /* GTRemote.m in Sources */, - 04DB4660133AB5EB00D9C624 /* NSError+Git.m in Sources */, - 6E98A3CB199A892C0048E067 /* GTRepository+RemoteOperations.m in Sources */, - 04DB4661133AB5EB00D9C624 /* GTRepository.m in Sources */, - 04DB4664133AB5EB00D9C624 /* GTEnumerator.m in Sources */, - 398F8AA7183111260071359D /* GTCredential.m in Sources */, - 04DB4665133AB5EB00D9C624 /* GTCommit.m in Sources */, - 04DB4666133AB5EB00D9C624 /* GTObject.m in Sources */, - 04DB4667133AB5EB00D9C624 /* GTSignature.m in Sources */, - 04DB4668133AB5EB00D9C624 /* GTTree.m in Sources */, - DD3D9520182AB3C4004AF532 /* GTBlameHunk.m in Sources */, - 04DB4669133AB5EB00D9C624 /* GTTreeEntry.m in Sources */, - 04DB466A133AB5EB00D9C624 /* GTBlob.m in Sources */, - 306123B017EA5261006591D4 /* EXTScope.m in Sources */, - 04DB466B133AB5EB00D9C624 /* GTTag.m in Sources */, - 04DB466C133AB5EB00D9C624 /* GTIndex.m in Sources */, - 30DCBA7517B4791A009B0EBD /* NSArray+StringArray.m in Sources */, - 30DCBA6717B45A78009B0EBD /* GTRepository+Status.m in Sources */, - 04DB466D133AB5EB00D9C624 /* GTIndexEntry.m in Sources */, - 04DB466E133AB5EB00D9C624 /* GTReference.m in Sources */, - 04DB466F133AB5EB00D9C624 /* GTBranch.m in Sources */, - AA046115134F4D2000DF526B /* GTOdbObject.m in Sources */, - 55C8054F13861FE7004DCB0F /* GTObjectDatabase.m in Sources */, - 55C8057C13875579004DCB0F /* NSString+Git.m in Sources */, - E9FFC6BF1577CC8300A9E736 /* GTConfiguration.m in Sources */, - D0CE552418B6C58F008EB8E0 /* GTFilterList.m in Sources */, - 88746CC717FA1C950005888A /* GTRepository+Committing.m in Sources */, - 30A3D6571667F11C00C49A39 /* GTDiff.m in Sources */, - 3011D86E1668E48500CE3409 /* GTDiffFile.m in Sources */, - 3011D8741668E78500CE3409 /* GTDiffHunk.m in Sources */, - 6EEB51A4199D62D3001D72C0 /* GTFetchHeadEntry.m in Sources */, - 3011D87A1668F29600CE3409 /* GTDiffDelta.m in Sources */, - DD3D951E182AB3BD004AF532 /* GTBlame.m in Sources */, - 880EE66418AE700500B82455 /* GTFilter.m in Sources */, - 88BC0E5318EF4F3600C7D0E6 /* GTRepository+Reset.m in Sources */, - 30FDC08216835A8100654BF0 /* GTDiffLine.m in Sources */, - 30DCBA6017B45213009B0EBD /* GTStatusDelta.m in Sources */, - 30B1E7F11703522100D0814D /* NSDate+GTTimeAdditions.m in Sources */, - 8821546C1714740500D76B76 /* GTReflog.m in Sources */, - 8821547917147A5200D76B76 /* GTReflogEntry.m in Sources */, - D03B57A518BFFF07007124F4 /* GTDiffPatch.m in Sources */, - 8821548017147B3600D76B76 /* GTOID.m in Sources */, - 5BE6128B1745EE3400266D8C /* GTTreeBuilder.m in Sources */, - D015F7CD17F695E800AD5E1F /* GTRepository+Stashing.m in Sources */, - 20F43DE718A2F668007D3621 /* GTRepository+Blame.m in Sources */, - D09C2E391755F16200065E36 /* GTSubmodule.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 88F05A6616011E5400B7AD1D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( D0751CD918BE520400134314 /* GTFilterListSpec.m in Sources */, 200578C518932A82001C06C3 /* GTBlameSpec.m in Sources */, - 88F05AC816012CEE00B7AD1D /* NSData+Git.m in Sources */, - 88F05AC716012CE500B7AD1D /* NSString+Git.m in Sources */, 4D1C40D8182C006D00BE2960 /* GTBlobSpec.m in Sources */, 88F05AB516011FFD00B7AD1D /* GTCommitSpec.m in Sources */, - 88F05AB916011FFD00B7AD1D /* GTObjectTest.m in Sources */, + D0A0129719F9A660007F1914 /* SwiftSpec.swift in Sources */, + 88F05AB916011FFD00B7AD1D /* GTObjectSpec.m in Sources */, 30865A91167F503400B1AB6E /* GTDiffSpec.m in Sources */, 88A994BA16FCE7D400402C7B /* GTBranchSpec.m in Sources */, 2089E43C17D9A58000F451DA /* GTTagSpec.m in Sources */, D015F7D517F6965400AD5E1F /* GTRepositoryStashingSpec.m in Sources */, - 88A994CB16FCED1D00402C7B /* GTTestCase.m in Sources */, + 88A994CB16FCED1D00402C7B /* QuickSpec+GTFixtures.m in Sources */, 30B1E8001703871900D0814D /* GTTimeAdditionsSpec.m in Sources */, 8870390B1975E3F2004118D7 /* GTDiffDeltaSpec.m in Sources */, - 30DCBA6617B45A78009B0EBD /* GTRepository+Status.m in Sources */, 88C0BC5917038CF3009E99AA /* GTConfigurationSpec.m in Sources */, - 30DCBA5F17B45213009B0EBD /* GTStatusDelta.m in Sources */, 88215483171499BE00D76B76 /* GTReflogSpec.m in Sources */, 88948AC91779243600809CDA /* GTObjectDatabaseSpec.m in Sources */, 886E623718AECD86000611A0 /* GTFilterSpec.m in Sources */, D0AC906C172F941F00347DC4 /* GTRepositorySpec.m in Sources */, - 30DCBA7417B4791A009B0EBD /* NSArray+StringArray.m in Sources */, - 306123AF17EA5261006591D4 /* EXTScope.m in Sources */, D01EFDA0195DEF2200838D24 /* NSDataGitSpec.m in Sources */, 30A269AD17B4878C000FE64E /* GTRepository+StatusSpec.m in Sources */, 307623AB17C6C8BD00E2CDF1 /* NSArray+StringArraySpec.m in Sources */, @@ -1421,6 +1317,63 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D01B6ECE19F82E2000D411BC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D01B6F7419F82FB300D411BC /* GTDiffLine.m in Sources */, + D01B6F3C19F82F8700D411BC /* GTTreeBuilder.m in Sources */, + D01B6F4219F82F8700D411BC /* GTIndexEntry.m in Sources */, + D01B6F2E19F82F8700D411BC /* GTEnumerator.m in Sources */, + D01B6F4C19F82F8700D411BC /* GTConfiguration.m in Sources */, + D01B6F6619F82FA600D411BC /* GTRepository+Attributes.m in Sources */, + D019778A19F8307600F523DA /* ObjectiveGit.m in Sources */, + D01B6F3219F82F8700D411BC /* GTCommit.m in Sources */, + D01B6F3819F82F8700D411BC /* GTTree.m in Sources */, + D01B6F6C19F82FB300D411BC /* GTDiff.m in Sources */, + 884C8A3A19FF4B890017E98D /* EXTScope.m in Sources */, + D01B6F4E19F82F8700D411BC /* GTRemote.m in Sources */, + D01B6F3019F82F8700D411BC /* GTObject.m in Sources */, + D01B6F4619F82F8700D411BC /* GTBranch.m in Sources */, + D01B6F3A19F82F8700D411BC /* GTTreeEntry.m in Sources */, + D01B6F2419F82F8700D411BC /* GTRepository+Reset.m in Sources */, + D01B6F5219F82FA600D411BC /* GTBlame.m in Sources */, + D01B6F5A19F82FA600D411BC /* GTOID.m in Sources */, + D01B6F2219F82F8700D411BC /* GTRepository+Status.m in Sources */, + D01B6F3419F82F8700D411BC /* GTSignature.m in Sources */, + D01B6F4419F82F8700D411BC /* GTReference.m in Sources */, + D01B6F6019F82FA600D411BC /* GTFilter.m in Sources */, + D01B6F1819F82F7B00D411BC /* NSError+Git.m in Sources */, + D01B6F2A19F82F8700D411BC /* GTRepository+Committing.m in Sources */, + D01B6F5019F82FA600D411BC /* GTRepository+Blame.m in Sources */, + D01B6F5C19F82FA600D411BC /* GTSubmodule.m in Sources */, + D01B6F4019F82F8700D411BC /* GTIndex.m in Sources */, + D01B6F7219F82FB300D411BC /* GTDiffDelta.m in Sources */, + D01B6F6419F82FA600D411BC /* GTFilterList.m in Sources */, + D01B6F2819F82F8700D411BC /* GTRepository+Stashing.m in Sources */, + D01B6F7619F82FB300D411BC /* GTDiffPatch.m in Sources */, + D01B6F3E19F82F8700D411BC /* GTTag.m in Sources */, + D01B6F1A19F82F7B00D411BC /* NSString+Git.m in Sources */, + D01B6F2619F82F8700D411BC /* GTStatusDelta.m in Sources */, + D01B6F2019F82F8700D411BC /* GTRepository.m in Sources */, + D01B6F7019F82FB300D411BC /* GTDiffHunk.m in Sources */, + D01B6F4819F82F8700D411BC /* GTObjectDatabase.m in Sources */, + D01B6F2C19F82F8700D411BC /* GTRepository+RemoteOperations.m in Sources */, + D01B6F5419F82FA600D411BC /* GTBlameHunk.m in Sources */, + D01B6F6819F82FA600D411BC /* GTFetchHeadEntry.m in Sources */, + D01B6F3619F82F8700D411BC /* GTBlob.m in Sources */, + D01B6F6E19F82FB300D411BC /* GTDiffFile.m in Sources */, + D01B6F5619F82FA600D411BC /* GTReflog.m in Sources */, + D01B6F5E19F82FA600D411BC /* GTCredential.m in Sources */, + D01B6F6219F82FA600D411BC /* GTFilterSource.m in Sources */, + D01B6F1C19F82F7B00D411BC /* NSDate+GTTimeAdditions.m in Sources */, + D01B6F1619F82F7B00D411BC /* NSData+Git.m in Sources */, + D01B6F1E19F82F7B00D411BC /* NSArray+StringArray.m in Sources */, + D01B6F5819F82FA600D411BC /* GTReflogEntry.m in Sources */, + D01B6F4A19F82F8700D411BC /* GTOdbObject.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1441,19 +1394,19 @@ }; 88F05AA016011F9000B7AD1D /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 8DC2EF4F0486A6940098B216 /* ObjectiveGit */; + target = 8DC2EF4F0486A6940098B216 /* ObjectiveGit-Mac */; targetProxy = 88F05A9F16011F9000B7AD1D /* PBXContainerItemProxy */; }; + D019779719F8335100F523DA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D0A330F216027F3600A616FA /* libgit2-iOS */; + targetProxy = D019779619F8335100F523DA /* PBXContainerItemProxy */; + }; D0A330F816027F4900A616FA /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = D0A330ED16027F1E00A616FA /* libgit2 */; targetProxy = D0A330F716027F4900A616FA /* PBXContainerItemProxy */; }; - D0A330FA16027F4D00A616FA /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = D0A330F216027F3600A616FA /* libgit2-iOS */; - targetProxy = D0A330F916027F4D00A616FA /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -1465,81 +1418,9 @@ name = InfoPlist.strings; sourceTree = ""; }; - 88F05A7816011E5400B7AD1D /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 88F05A7916011E5400B7AD1D /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 04DB4646133AB57600D9C624 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */; - buildSettings = { - GCC_PREFIX_HEADER = ObjectiveGitFramework_Prefix.pch; - HEADER_SEARCH_PATHS = ( - External/libgit2/include, - "$(OBJROOT)/UninstalledProducts/include", - "External/libssh2-ios/include/libssh2", - ); - LIBRARY_SEARCH_PATHS = ( - "External/ios-openssl/lib", - "External/libssh2-ios/lib", - "$(inherited)", - ); - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "$(inherited)", - "-DGIT_SSH", - ); - OTHER_LDFLAGS = ( - "-lgit2-ios", - "-all_load", - "-lssh2-ios", - ); - PRIVATE_HEADERS_FOLDER_PATH = include/ObjectiveGit; - PRODUCT_NAME = "ObjectiveGit-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = include/ObjectiveGit; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = Debug; - }; - 04DB4647133AB57600D9C624 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */; - buildSettings = { - GCC_PREFIX_HEADER = ObjectiveGitFramework_Prefix.pch; - HEADER_SEARCH_PATHS = ( - External/libgit2/include, - "$(OBJROOT)/UninstalledProducts/include", - "External/libssh2-ios/include/libssh2", - ); - LIBRARY_SEARCH_PATHS = ( - "External/ios-openssl/lib", - "External/libssh2-ios/lib", - "$(inherited)", - ); - ONLY_ACTIVE_ARCH = NO; - OTHER_CFLAGS = ( - "$(inherited)", - "-DGIT_SSH", - ); - OTHER_LDFLAGS = ( - "-lgit2-ios", - "-all_load", - "-lssh2-ios", - ); - PRIVATE_HEADERS_FOLDER_PATH = include/ObjectiveGit; - PRODUCT_NAME = "ObjectiveGit-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = include/ObjectiveGit; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = Release; - }; 1DEB91AE08733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; @@ -1547,7 +1428,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; - GCC_PREFIX_HEADER = ObjectiveGitFramework_Prefix.pch; INFOPLIST_FILE = Info.plist; OTHER_LDFLAGS = ( "-lgit2", @@ -1558,7 +1438,6 @@ "-lssl", ); PRODUCT_NAME = ObjectiveGit; - USER_HEADER_SEARCH_PATHS = ""; WRAPPER_EXTENSION = framework; }; name = Debug; @@ -1570,7 +1449,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; - GCC_PREFIX_HEADER = ObjectiveGitFramework_Prefix.pch; INFOPLIST_FILE = Info.plist; OTHER_LDFLAGS = ( "-lgit2", @@ -1581,7 +1459,6 @@ "-lssl", ); PRODUCT_NAME = ObjectiveGit; - USER_HEADER_SEARCH_PATHS = ""; WRAPPER_EXTENSION = framework; }; name = Release; @@ -1590,24 +1467,27 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0A463D817E57C45000F5021 /* Debug.xcconfig */; buildSettings = { - GCC_STRICT_ALIASING = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; HEADER_SEARCH_PATHS = ( External/libgit2/include, /usr/local/include, ); - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", ); - TEST_AFTER_BUILD = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + WARNING_CFLAGS = ( + "$(inherited)", + "-Wno-incomplete-umbrella", + ); }; name = Debug; }; @@ -1615,23 +1495,27 @@ isa = XCBuildConfiguration; baseConfigurationReference = D0A463DA17E57C45000F5021 /* Release.xcconfig */; buildSettings = { - GCC_STRICT_ALIASING = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; HEADER_SEARCH_PATHS = ( External/libgit2/include, /usr/local/include, ); - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", ); - TEST_AFTER_BUILD = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + WARNING_CFLAGS = ( + "$(inherited)", + "-Wno-incomplete-umbrella", + ); }; name = Release; }; @@ -1691,14 +1575,8 @@ "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); - GCC_PREFIX_HEADER = "ObjectiveGitTests/ObjectiveGitTests-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ObjectiveGitTests/specta/src, - "ObjectiveGitTests/expecta/src/**", - ); INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist"; - OTHER_LDFLAGS = "-all_load"; + MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -1711,50 +1589,47 @@ "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); - GCC_PREFIX_HEADER = "ObjectiveGitTests/ObjectiveGitTests-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ObjectiveGitTests/specta/src, - "ObjectiveGitTests/expecta/src/**", - ); INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist"; - OTHER_LDFLAGS = "-all_load"; + MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; - D03FC3D71602E97F00BCFA73 /* Profile */ = { + D019778D19F830F500F523DA /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D0A463D917E57C45000F5021 /* Profile.xcconfig */; + baseConfigurationReference = D0A463DB17E57C45000F5021 /* Test.xcconfig */; buildSettings = { - GCC_STRICT_ALIASING = NO; + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; HEADER_SEARCH_PATHS = ( External/libgit2/include, /usr/local/include, ); - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LIBRARY_SEARCH_PATHS = ( ., External, ); - MACOSX_DEPLOYMENT_TARGET = 10.7; + MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", ); - TEST_AFTER_BUILD = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + WARNING_CFLAGS = ( + "$(inherited)", + "-Wno-incomplete-umbrella", + ); }; - name = Profile; + name = Test; }; - D03FC3D81602E97F00BCFA73 /* Profile */ = { + D019778E19F830F500F523DA /* Test */ = { isa = XCBuildConfiguration; baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; - GCC_PREFIX_HEADER = ObjectiveGitFramework_Prefix.pch; INFOPLIST_FILE = Info.plist; OTHER_LDFLAGS = ( "-lgit2", @@ -1765,40 +1640,222 @@ "-lssl", ); PRODUCT_NAME = ObjectiveGit; - USER_HEADER_SEARCH_PATHS = ""; WRAPPER_EXTENSION = framework; }; - name = Profile; + name = Test; + }; + D019778F19F830F500F523DA /* Test */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D0D81867174421EB00995A2E /* Mac-Application.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Test; + }; + D019779019F830F500F523DA /* Test */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "External/libssh2-ios/include/libssh2", + External/libgit2/include, + ); + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ( + "External/ios-openssl/lib", + "External/libssh2-ios/lib", + "External/libgit2-ios", + ); + OTHER_LDFLAGS = ( + "-lgit2-ios", + "-all_load", + ); + PRODUCT_NAME = ObjectiveGit; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Test; }; - D03FC3D91602E97F00BCFA73 /* Profile */ = { + D019779219F830F500F523DA /* Test */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D0D8186B174421EB00995A2E /* Mac-StaticLibrary.xcconfig */; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Test; + }; + D019779319F830F500F523DA /* Test */ = { isa = XCBuildConfiguration; baseConfigurationReference = D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */; buildSettings = { - GCC_PREFIX_HEADER = ObjectiveGitFramework_Prefix.pch; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Test; + }; + D019779419F830F500F523DA /* Test */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */; + buildSettings = { + PRODUCT_NAME = "OpenSSL-iOS"; + }; + name = Test; + }; + D019779519F830F500F523DA /* Test */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D0D81865174421EB00995A2E /* iOS-StaticLibrary.xcconfig */; + buildSettings = { + PRODUCT_NAME = "libssh2-iOS"; + }; + name = Test; + }; + D01B6EE719F82E2000D411BC /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; HEADER_SEARCH_PATHS = ( + "$(inherited)", + "External/libssh2-ios/include/libssh2", External/libgit2/include, - "$(OBJROOT)/UninstalledProducts/include", + ); + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ( + "External/ios-openssl/lib", + "External/libssh2-ios/lib", + "External/libgit2-ios", + ); + OTHER_LDFLAGS = ( + "-lgit2-ios", + "-all_load", + ); + PRODUCT_NAME = ObjectiveGit; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + D01B6EE819F82E2000D411BC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + HEADER_SEARCH_PATHS = ( + "$(inherited)", "External/libssh2-ios/include/libssh2", + External/libgit2/include, ); + INFOPLIST_FILE = Info.plist; LIBRARY_SEARCH_PATHS = ( "External/ios-openssl/lib", "External/libssh2-ios/lib", + "External/libgit2-ios", + ); + OTHER_LDFLAGS = ( + "-lgit2-ios", + "-all_load", + ); + PRODUCT_NAME = ObjectiveGit; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D01B6EE919F82E2000D411BC /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D019778C19F830D100F523DA /* iOS-Framework.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + HEADER_SEARCH_PATHS = ( "$(inherited)", + "External/libssh2-ios/include/libssh2", + External/libgit2/include, + ); + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ( + "External/ios-openssl/lib", + "External/libssh2-ios/lib", + "External/libgit2-ios", ); - ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "-lgit2-ios", + "-all_load", + ); + PRODUCT_NAME = ObjectiveGit; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Profile; + }; + D03FC3D71602E97F00BCFA73 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D0A463D917E57C45000F5021 /* Profile.xcconfig */; + buildSettings = { + CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = NO; + HEADER_SEARCH_PATHS = ( + External/libgit2/include, + /usr/local/include, + ); + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LIBRARY_SEARCH_PATHS = ( + ., + External, + ); + MACOSX_DEPLOYMENT_TARGET = 10.8; OTHER_CFLAGS = ( "$(inherited)", "-DGIT_SSH", ); + TARGETED_DEVICE_FAMILY = "1,2"; + WARNING_CFLAGS = ( + "$(inherited)", + "-Wno-incomplete-umbrella", + ); + }; + name = Profile; + }; + D03FC3D81602E97F00BCFA73 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D0D8186A174421EB00995A2E /* Mac-Framework.xcconfig */; + buildSettings = { + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = Info.plist; OTHER_LDFLAGS = ( - "-lgit2-ios", - "-all_load", - "-lssh2-ios", + "-lgit2", + "-force_load", + External/libgit2.a, + /usr/local/lib/libssh2.a, + "-lcrypto", + "-lssl", ); - PRIVATE_HEADERS_FOLDER_PATH = include/ObjectiveGit; - PRODUCT_NAME = "ObjectiveGit-iOS"; - PUBLIC_HEADERS_FOLDER_PATH = include/ObjectiveGit; - USER_HEADER_SEARCH_PATHS = ""; + PRODUCT_NAME = ObjectiveGit; + WRAPPER_EXTENSION = framework; }; name = Profile; }; @@ -1810,14 +1867,8 @@ "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); - GCC_PREFIX_HEADER = "ObjectiveGitTests/ObjectiveGitTests-Prefix.pch"; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - ObjectiveGitTests/specta/src, - "ObjectiveGitTests/expecta/src/**", - ); INFOPLIST_FILE = "ObjectiveGitTests/ObjectiveGitTests-Info.plist"; - OTHER_LDFLAGS = "-all_load"; + MACOSX_DEPLOYMENT_TARGET = 10.9; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Profile; @@ -1873,20 +1924,11 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 04DB464B133AB58900D9C624 /* Build configuration list for PBXNativeTarget "ObjectiveGit-iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 04DB4646133AB57600D9C624 /* Debug */, - 04DB4647133AB57600D9C624 /* Release */, - D03FC3D91602E97F00BCFA73 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "ObjectiveGit" */ = { + 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "ObjectiveGit-Mac" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB91AE08733DA50010E9CD /* Debug */, + D019778E19F830F500F523DA /* Test */, 1DEB91AF08733DA50010E9CD /* Release */, D03FC3D81602E97F00BCFA73 /* Profile */, ); @@ -1897,6 +1939,7 @@ isa = XCConfigurationList; buildConfigurations = ( 1DEB91B208733DA50010E9CD /* Debug */, + D019778D19F830F500F523DA /* Test */, 1DEB91B308733DA50010E9CD /* Release */, D03FC3D71602E97F00BCFA73 /* Profile */, ); @@ -1907,6 +1950,7 @@ isa = XCConfigurationList; buildConfigurations = ( 6A28265517C69CB400C6A948 /* Debug */, + D019779419F830F500F523DA /* Test */, 6A28265617C69CB400C6A948 /* Release */, 6A28265717C69CB400C6A948 /* Profile */, ); @@ -1917,26 +1961,40 @@ isa = XCConfigurationList; buildConfigurations = ( 6A3C609317D5963700382DFF /* Debug */, + D019779519F830F500F523DA /* Test */, 6A3C609417D5963700382DFF /* Release */, 6A3C609517D5963700382DFF /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 88F05A7F16011E5400B7AD1D /* Build configuration list for PBXNativeTarget "ObjectiveGitTests" */ = { + 88F05A7F16011E5400B7AD1D /* Build configuration list for PBXNativeTarget "ObjectiveGit-MacTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 88F05A8016011E5400B7AD1D /* Debug */, + D019778F19F830F500F523DA /* Test */, 88F05A8116011E5400B7AD1D /* Release */, D03FC3DA1602E97F00BCFA73 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + D01B6EE619F82E2000D411BC /* Build configuration list for PBXNativeTarget "ObjectiveGit-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D01B6EE719F82E2000D411BC /* Debug */, + D019779019F830F500F523DA /* Test */, + D01B6EE819F82E2000D411BC /* Release */, + D01B6EE919F82E2000D411BC /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; D0A330EE16027F1E00A616FA /* Build configuration list for PBXAggregateTarget "libgit2" */ = { isa = XCConfigurationList; buildConfigurations = ( D0A330EF16027F1E00A616FA /* Debug */, + D019779219F830F500F523DA /* Test */, D0A330F016027F1E00A616FA /* Release */, D03FC3DB1602E97F00BCFA73 /* Profile */, ); @@ -1947,6 +2005,7 @@ isa = XCConfigurationList; buildConfigurations = ( D0A330F416027F3700A616FA /* Debug */, + D019779319F830F500F523DA /* Test */, D0A330F516027F3700A616FA /* Release */, D03FC3DC1602E97F00BCFA73 /* Profile */, ); diff --git a/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit.xcscheme b/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit Mac.xcscheme similarity index 60% rename from ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit.xcscheme rename to ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit Mac.xcscheme index 430191963..497d4b70d 100644 --- a/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit.xcscheme +++ b/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit Mac.xcscheme @@ -1,7 +1,7 @@ + version = "2.0"> @@ -16,21 +16,21 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "8DC2EF4F0486A6940098B216" BuildableName = "ObjectiveGit.framework" - BlueprintName = "ObjectiveGit" + BlueprintName = "ObjectiveGit-Mac" ReferencedContainer = "container:ObjectiveGitFramework.xcodeproj"> + buildForAnalyzing = "NO"> @@ -47,22 +47,41 @@ + + + + + + + + @@ -72,6 +91,15 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Profile" debugDocumentVersioning = "YES"> + + + + diff --git a/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit-iOS.xcscheme b/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit iOS.xcscheme similarity index 52% rename from ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit-iOS.xcscheme rename to ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit iOS.xcscheme index 1833b790d..d33bab7a2 100644 --- a/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit-iOS.xcscheme +++ b/ObjectiveGitFramework.xcodeproj/xcshareddata/xcschemes/ObjectiveGit iOS.xcscheme @@ -14,8 +14,8 @@ buildForAnalyzing = "YES"> @@ -28,7 +28,26 @@ shouldUseLaunchSchemeArgsEnv = "YES" buildConfiguration = "Debug"> + + + + + + + + + + + + @@ -48,6 +76,15 @@ useCustomWorkingDirectory = "NO" buildConfiguration = "Profile" debugDocumentVersioning = "YES"> + + + + diff --git a/ObjectiveGitFramework.xcworkspace/contents.xcworkspacedata b/ObjectiveGitFramework.xcworkspace/contents.xcworkspacedata index 288e739a2..d2ba200ce 100644 --- a/ObjectiveGitFramework.xcworkspace/contents.xcworkspacedata +++ b/ObjectiveGitFramework.xcworkspace/contents.xcworkspacedata @@ -5,9 +5,9 @@ location = "group:ObjectiveGitFramework.xcodeproj"> + location = "group:External/Quick/Quick/Quick.xcodeproj"> + location = "group:External/Quick/Externals/Nimble/Nimble.xcodeproj"> diff --git a/ObjectiveGitFramework_Prefix.pch b/ObjectiveGitFramework_Prefix.pch deleted file mode 100644 index 26cd31d46..000000000 --- a/ObjectiveGitFramework_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'ObjectiveGitFramework' target in the 'ObjectiveGitFramework' project. -// - -#ifdef __OBJC__ - #import -#endif - -#define GTLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); diff --git a/ObjectiveGitTests/GTBlameSpec.m b/ObjectiveGitTests/GTBlameSpec.m index b0f438794..8cd8a8225 100644 --- a/ObjectiveGitTests/GTBlameSpec.m +++ b/ObjectiveGitTests/GTBlameSpec.m @@ -6,32 +6,38 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -SpecBegin(GTBlame) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTBlameSpec) __block GTBlame *blame = nil; beforeEach(^{ blame = [self.testAppFixtureRepository blameWithFile:@"README1.txt" options:nil error:nil]; - expect(blame).toNot.beNil(); + expect(blame).notTo(beNil()); }); it(@"can count the hunks", ^{ - expect(blame.hunkCount).to.equal(4); + expect(@(blame.hunkCount)).to(equal(@4)); }); it(@"can read hunk properties", ^{ GTBlameHunk *hunk = [blame hunkAtIndex:1]; - - expect(hunk).notTo.beNil(); - expect(NSEqualRanges(hunk.lines, NSMakeRange(22, 1))).to.beTruthy(); - expect(hunk.finalCommitOID.SHA).to.equal(@"82dc47f6ba3beecab33080a1136d8913098e1801"); - expect(hunk.finalSignature).toNot.beNil(); - expect(hunk.originalPath).to.equal(@"README1.txt"); - expect(hunk.isBoundary).to.beFalsy(); + + expect(hunk).notTo(beNil()); + expect(@(NSEqualRanges(hunk.lines, NSMakeRange(22, 1)))).to(beTruthy()); + expect(hunk.finalCommitOID.SHA).to(equal(@"82dc47f6ba3beecab33080a1136d8913098e1801")); + expect(hunk.finalSignature).notTo(beNil()); + expect(hunk.originalPath).to(equal(@"README1.txt")); + expect(@(hunk.isBoundary)).to(beFalsy()); }); it(@"The number of hunks in the `hunks` array should match `hunkCount`", ^{ - expect(blame.hunks).to.haveCountOf(blame.hunkCount); + expect(@(blame.hunks.count)).to(equal(@(blame.hunkCount))); }); it(@"should be able to enumerate all the hunks in a blame, stopping when instructed", ^{ @@ -40,41 +46,41 @@ [mutableArray addObject:hunk]; *stop = YES; }]; - - expect(mutableArray).to.haveCountOf(1); + + expect(@(mutableArray.count)).to(equal(@(1))); }); it(@"should be able to get the same hunk from an index or a line", ^{ GTBlameHunk *hunk = [blame hunkAtIndex:0]; GTBlameHunk *lineHunk = [blame hunkAtLineNumber:1]; - expect(hunk).to.equal(lineHunk); + expect(hunk).to(equal(lineHunk)); }); describe(@"Creating a blame with options", ^{ it(@"should follow the instructions provided by the GTBlameOptionsOldestCommitOID key", ^{ GTBlame *optionsBlame = [self.testAppFixtureRepository blameWithFile:@"README1.txt" options:@{ GTBlameOptionsOldestCommitOID: [GTOID oidWithSHA:@"1d69f3c0aeaf0d62e25591987b93b8ffc53abd77"] } error:nil]; - expect(optionsBlame).toNot.beNil(); - expect(optionsBlame).notTo.equal(blame); + expect(optionsBlame).notTo(beNil()); + expect(optionsBlame).notTo(equal(blame)); }); - + it(@"should follow the instructions provided by the GTBlameOptionsNewestCommitOID key", ^{ GTOID *newOID = [GTOID oidWithSHA:@"6317779b4731d9c837dcc6972b964bdf4211eeef"]; GTBlame *optionsBlame = [self.testAppFixtureRepository blameWithFile:@"README1.txt" options:@{ GTBlameOptionsNewestCommitOID: newOID } error:nil]; GTBlameHunk *hunk = [optionsBlame hunkAtIndex:0]; - expect(hunk.lines.location).to.equal(1); - expect(hunk.lines.length).to.equal(25); + expect(@(hunk.lines.location)).to(equal(@1)); + expect(@(hunk.lines.length)).to(equal(@25)); }); - + it(@"should follow the instructions provided by GTBlameOptionsFirstLine and GTBlameOptionsLastLine keys", ^{ GTBlame *optionsBlame = [self.testAppFixtureRepository blameWithFile:@"README1.txt" options:@{ GTBlameOptionsFirstLine: @22, GTBlameOptionsLastLine: @24 } error:nil]; GTBlameHunk *hunk = [optionsBlame hunkAtIndex:0]; - - expect(optionsBlame).toNot.beNil(); - expect(hunk.lines.location).to.equal(22); - expect(hunk.lines.length).to.equal(1); + + expect(optionsBlame).notTo(beNil()); + expect(@(hunk.lines.location)).to(equal(@22)); + expect(@(hunk.lines.length)).to(equal(@1)); }); }); @@ -82,4 +88,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTBlobSpec.m b/ObjectiveGitTests/GTBlobSpec.m index c0dd84e75..fed7020ca 100644 --- a/ObjectiveGitTests/GTBlobSpec.m +++ b/ObjectiveGitTests/GTBlobSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTBlob.h" +#import +#import +#import -SpecBegin(GTBlob) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTBlobSpec) __block GTRepository *repository; __block NSString *blobSHA; @@ -19,23 +23,23 @@ repository = self.bareFixtureRepository; blobSHA = @"fa49b077972391ad58037050f2a75f74e3671e92"; blob = [repository lookUpObjectBySHA:blobSHA objectType:GTObjectTypeBlob error:NULL]; - expect(blob).notTo.beNil(); + expect(blob).notTo(beNil()); }); it(@"has a size", ^{ - expect(blob.size).to.equal(9); + expect(@(blob.size)).to(equal(@9)); }); it(@"has content", ^{ - expect(blob.content).to.equal(@"new file\n"); + expect(blob.content).to(equal(@"new file\n")); }); it(@"has type", ^{ - expect(blob.type).to.equal(@"blob"); + expect(blob.type).to(equal(@"blob")); }); it(@"has a SHA", ^{ - expect(blob.SHA).to.equal(blobSHA); + expect(blob.SHA).to(equal(blobSHA)); }); }); @@ -48,9 +52,9 @@ it(@"works with valid parameters", ^{ NSError *error = nil; blob = [GTBlob blobWithString:@"a new blob content" inRepository:repository error:&error]; - expect(error).to.beNil(); - expect(blob).notTo.beNil(); - expect(blob.SHA).notTo.beNil(); + expect(error).to(beNil()); + expect(blob).notTo(beNil()); + expect(blob.SHA).notTo(beNil()); }); }); @@ -61,9 +65,9 @@ NSError *error = nil; blob = [GTBlob blobWithData:content inRepository:repository error:&error]; - expect(error).to.beNil(); - expect(blob).notTo.beNil(); - expect(blob.SHA).notTo.beNil(); + expect(error).to(beNil()); + expect(blob).notTo(beNil()); + expect(blob.SHA).notTo(beNil()); }); }); @@ -75,14 +79,14 @@ NSError *error = nil; BOOL success = [fileContent writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); blob = [GTBlob blobWithFile:fileURL inRepository:repository error:&error]; - expect(error).to.beNil(); - expect(blob).notTo.beNil(); - expect(blob.SHA).notTo.beNil(); - expect(blob.content).to.equal(fileContent); + expect(error).to(beNil()); + expect(blob).notTo(beNil()); + expect(blob.SHA).notTo(beNil()); + expect(blob.content).to(equal(fileContent)); }); }); }); @@ -91,4 +95,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTBranchSpec.m b/ObjectiveGitTests/GTBranchSpec.m index 18ff8a653..631207b05 100644 --- a/ObjectiveGitTests/GTBranchSpec.m +++ b/ObjectiveGitTests/GTBranchSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTBranch.h" +#import +#import +#import -SpecBegin(GTBranch) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTBranchSpec) __block GTRepository *repository; __block GTBranch *masterBranch; @@ -16,47 +20,47 @@ beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); NSError *error = nil; masterBranch = [repository currentBranchWithError:&error]; - expect(masterBranch).notTo.beNil(); - expect(error).to.beNil(); + expect(masterBranch).notTo(beNil()); + expect(error).to(beNil()); BOOL success = NO; trackingBranch = [masterBranch trackingBranchWithError:&error success:&success]; - expect(trackingBranch).notTo.equal(masterBranch); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(trackingBranch).notTo(equal(masterBranch)); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); describe(@"shortName", ^{ it(@"should use just the branch name for a local branch", ^{ - expect(masterBranch.shortName).to.equal(@"master"); + expect(masterBranch.shortName).to(equal(@"master")); }); it(@"should not include the remote name for a tracking branch", ^{ - expect(trackingBranch.shortName).to.equal(@"master"); + expect(trackingBranch.shortName).to(equal(@"master")); }); }); describe(@"remoteName", ^{ it(@"should return nil for a local branch", ^{ - expect(masterBranch.remoteName).to.beNil(); + expect(masterBranch.remoteName).to(beNil()); }); it(@"should return the remote name for a tracking branch", ^{ - expect(trackingBranch.remoteName).to.equal(@"origin"); + expect(trackingBranch.remoteName).to(equal(@"origin")); }); }); describe(@"branchType", ^{ it(@"should be GTBranchTypeLocal for a local branch", ^{ - expect(masterBranch.branchType).to.equal(GTBranchTypeLocal); + expect(@(masterBranch.branchType)).to(equal(@(GTBranchTypeLocal))); }); it(@"should be GTBranchTypeRemote for a tracking branch", ^{ - expect(trackingBranch.branchType).to.equal(GTBranchTypeRemote); + expect(@(trackingBranch.branchType)).to(equal(@(GTBranchTypeRemote))); }); }); @@ -65,16 +69,16 @@ size_t ahead = 0; size_t behind = 0; [masterBranch calculateAhead:&ahead behind:&behind relativeTo:trackingBranch error:NULL]; - expect(ahead).to.equal(9); - expect(behind).to.equal(0); + expect(@(ahead)).to(equal(@9)); + expect(@(behind)).to(equal(@0)); }); it(@"should calculate ahead/behind relative to the local branch", ^{ size_t ahead = 0; size_t behind = 0; [trackingBranch calculateAhead:&ahead behind:&behind relativeTo:masterBranch error:NULL]; - expect(ahead).to.equal(0); - expect(behind).to.equal(9); + expect(@(ahead)).to(equal(@0)); + expect(@(behind)).to(equal(@9)); }); }); @@ -82,8 +86,8 @@ it(@"should return unique commits relative to the tracking branch", ^{ NSError *error = nil; NSArray *commits = [masterBranch uniqueCommitsRelativeToBranch:trackingBranch error:&error]; - expect(commits).notTo.beNil(); - expect(error).to.beNil(); + expect(commits).notTo(beNil()); + expect(error).to(beNil()); NSMutableArray *SHAs = [NSMutableArray array]; for (GTCommit *commit in commits) { @@ -102,14 +106,14 @@ @"9f90c6e24629fae3ef51101bb6448342b44098ef", ]; - expect(SHAs).to.equal(expectedSHAs); + expect(SHAs).to(equal(expectedSHAs)); }); it(@"should return no unique commits relative to the local branch", ^{ NSError *error = nil; NSArray *commits = [trackingBranch uniqueCommitsRelativeToBranch:masterBranch error:&error]; - expect(commits).to.equal(@[]); - expect(error).to.beNil(); + expect(commits).to(equal(@[])); + expect(error).to(beNil()); }); }); @@ -117,13 +121,13 @@ it(@"should reload the branch from disk", ^{ static NSString * const originalSHA = @"a4bca6b67a5483169963572ee3da563da33712f7"; static NSString * const updatedSHA = @"6b0c1c8b8816416089c534e474f4c692a76ac14f"; - expect([masterBranch targetCommitAndReturnError:NULL].SHA).to.equal(originalSHA); + expect([masterBranch targetCommitAndReturnError:NULL].SHA).to(equal(originalSHA)); [masterBranch.reference referenceByUpdatingTarget:updatedSHA committer:nil message:nil error:NULL]; GTBranch *reloadedBranch = [masterBranch reloadedBranchWithError:NULL]; - expect(reloadedBranch).notTo.beNil(); - expect([reloadedBranch targetCommitAndReturnError:NULL].SHA).to.equal(updatedSHA); - expect([masterBranch targetCommitAndReturnError:NULL].SHA).to.equal(originalSHA); + expect(reloadedBranch).notTo(beNil()); + expect([reloadedBranch targetCommitAndReturnError:NULL].SHA).to(equal(updatedSHA)); + expect([masterBranch targetCommitAndReturnError:NULL].SHA).to(equal(originalSHA)); }); }); @@ -131,8 +135,8 @@ it(@"should return the count of commits in the branch", ^{ NSError *error = nil; NSUInteger commitCount = [masterBranch numberOfCommitsWithError:&error]; - expect(commitCount).to.equal(164); - expect(error).to.beNil(); + expect(@(commitCount)).to(equal(@164)); + expect(error).to(beNil()); }); }); @@ -140,14 +144,14 @@ it(@"should return the tracking branch for a local branch that tracks a remote branch", ^{ NSError *error = nil; GTBranch *masterBranch = [repository lookUpBranchWithName:@"master" type:GTBranchTypeLocal success:NULL error:&error]; - expect(masterBranch).notTo.beNil(); - expect(error).to.beNil(); + expect(masterBranch).notTo(beNil()); + expect(error).to(beNil()); BOOL success = NO; GTBranch *trackingBranch = [masterBranch trackingBranchWithError:&error success:&success]; - expect(trackingBranch).notTo.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(trackingBranch).notTo(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should return nil for a local branch that doesn't track a remote branch", ^{ @@ -155,33 +159,33 @@ NSError *error = nil; GTReference *otherRef = [repository createReferenceNamed:@"refs/heads/yet-another-branch" fromOID:OID committer:nil message:nil error:&error]; - expect(otherRef).notTo.beNil(); - expect(error).to.beNil(); + expect(otherRef).notTo(beNil()); + expect(error).to(beNil()); GTBranch *otherBranch = [GTBranch branchWithReference:otherRef repository:repository]; - expect(otherBranch).notTo.beNil(); + expect(otherBranch).notTo(beNil()); BOOL success = NO; trackingBranch = [otherBranch trackingBranchWithError:&error success:&success]; - expect(trackingBranch).to.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(trackingBranch).to(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should return itself for a remote branch", ^{ NSError *error = nil; GTReference *remoteRef = [GTReference referenceByLookingUpReferencedNamed:@"refs/remotes/origin/master" inRepository:repository error:&error]; - expect(remoteRef).notTo.beNil(); - expect(error).to.beNil(); + expect(remoteRef).notTo(beNil()); + expect(error).to(beNil()); GTBranch *remoteBranch = [GTBranch branchWithReference:remoteRef repository:repository]; - expect(remoteBranch).notTo.beNil(); + expect(remoteBranch).notTo(beNil()); BOOL success = NO; GTBranch *remoteTrackingBranch = [remoteBranch trackingBranchWithError:&error success:&success]; - expect(remoteTrackingBranch).to.equal(remoteBranch); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(remoteTrackingBranch).to(equal(remoteBranch)); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); }); @@ -212,4 +216,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTCommitSpec.m b/ObjectiveGitTests/GTCommitSpec.m index 706dd077f..31e80e998 100644 --- a/ObjectiveGitTests/GTCommitSpec.m +++ b/ObjectiveGitTests/GTCommitSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTCommit.h" +#import +#import +#import -SpecBegin(GTCommit) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTCommitSpec) __block GTRepository *repository; @@ -21,55 +25,55 @@ NSString *commitSHA = @"8496071c1b46c854b31185ea97743be6a8774479"; GTCommit *commit = [repository lookUpObjectBySHA:commitSHA error:&error]; - expect(commit).notTo.beNil(); - expect(error).to.beNil(); + expect(commit).notTo(beNil()); + expect(error).to(beNil()); - expect(commit).to.beInstanceOf(GTCommit.class); - expect(commit.type).to.equal(@"commit"); - expect(commit.SHA).to.equal(commitSHA); + expect(commit).to(beAnInstanceOf(GTCommit.class)); + expect(commit.type).to(equal(@"commit")); + expect(commit.SHA).to(equal(commitSHA)); - expect(commit.message).to.equal(@"testing\n"); - expect(commit.messageSummary).to.equal(@"testing"); - expect(commit.messageDetails).to.equal(@""); - expect(commit.commitDate).to.equal([NSDate dateWithTimeIntervalSince1970:1273360386]); + expect(commit.message).to(equal(@"testing\n")); + expect(commit.messageSummary).to(equal(@"testing")); + expect(commit.messageDetails).to(equal(@"")); + expect(commit.commitDate).to(equal([NSDate dateWithTimeIntervalSince1970:1273360386])); GTSignature *author = commit.author; - expect(author).notTo.beNil(); - expect(author.name).to.equal(@"Scott Chacon"); - expect(author.email).to.equal(@"schacon@gmail.com"); - expect(author.time).to.equal([NSDate dateWithTimeIntervalSince1970:1273360386]); + expect(author).notTo(beNil()); + expect(author.name).to(equal(@"Scott Chacon")); + expect(author.email).to(equal(@"schacon@gmail.com")); + expect(author.time).to(equal([NSDate dateWithTimeIntervalSince1970:1273360386])); GTSignature *committer = commit.committer; - expect(committer).notTo.beNil(); - expect(committer.name).to.equal(@"Scott Chacon"); - expect(committer.email).to.equal(@"schacon@gmail.com"); - expect(committer.time).to.equal([NSDate dateWithTimeIntervalSince1970:1273360386]); + expect(committer).notTo(beNil()); + expect(committer.name).to(equal(@"Scott Chacon")); + expect(committer.email).to(equal(@"schacon@gmail.com")); + expect(committer.time).to(equal([NSDate dateWithTimeIntervalSince1970:1273360386])); - expect(commit.tree.SHA).to.equal(@"181037049a54a1eb5fab404658a3a250b44335d7"); - expect(commit.parents.count).to.equal(0); + expect(commit.tree.SHA).to(equal(@"181037049a54a1eb5fab404658a3a250b44335d7")); + expect(@(commit.parents.count)).to(equal(@0)); }); it(@"can have multiple parents", ^{ NSError *error = nil; NSString *commitSHA = @"a4a7dce85cf63874e984719f4fdd239f5145052f"; GTCommit *commit = [repository lookUpObjectBySHA:commitSHA error:&error]; - expect(commit).notTo.beNil(); - expect(error).to.beNil(); + expect(commit).notTo(beNil()); + expect(error).to(beNil()); - expect(commit.parents.count).to.equal(2); + expect(@(commit.parents.count)).to(equal(@2)); }); it(@"can identify merges", ^{ NSError *error; NSString *commitSHA = @"a4a7dce85cf63874e984719f4fdd239f5145052f"; GTCommit *commit = [repository lookUpObjectBySHA:commitSHA error:&error]; - expect(commit).notTo.beNil(); + expect(commit).notTo(beNil()); - expect(commit.merge).to.beTruthy(); + expect(@(commit.merge)).to(beTruthy()); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTConfigurationSpec.m b/ObjectiveGitTests/GTConfigurationSpec.m index da93ba85a..c225a04ec 100644 --- a/ObjectiveGitTests/GTConfigurationSpec.m +++ b/ObjectiveGitTests/GTConfigurationSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTConfiguration.h" +#import +#import +#import -SpecBegin(GTConfiguration) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTConfigurationSpec) describe(@"+defaultConfiguration", ^{ static NSString * const testKey = @"universe.answer"; @@ -18,32 +22,32 @@ beforeEach(^{ config = [GTConfiguration defaultConfiguration]; - expect(config).notTo.beNil(); + expect(config).notTo(beNil()); }); it(@"should return nil for -remotes", ^{ - expect(config.remotes).to.beNil(); + expect(config.remotes).to(beNil()); }); it(@"should support reading and writing", ^{ id value = [config stringForKey:testKey]; - expect(value).to.beNil(); + expect(value).to(beNil()); [config setString:testValue forKey:testKey]; value = [config stringForKey:testKey]; - expect(value).to.equal(testValue); + expect(value).to(equal(testValue)); }); it(@"should support deletion", ^{ [config setString:testValue forKey:testKey]; id value = [config stringForKey:testKey]; - expect(value).notTo.beNil(); + expect(value).notTo(beNil()); BOOL success = [config deleteValueForKey:testKey error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); value = [config stringForKey:testKey]; - expect(value).to.beNil(); + expect(value).to(beNil()); }); }); @@ -51,4 +55,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTDiffDeltaSpec.m b/ObjectiveGitTests/GTDiffDeltaSpec.m index 921c70695..e326861f5 100644 --- a/ObjectiveGitTests/GTDiffDeltaSpec.m +++ b/ObjectiveGitTests/GTDiffDeltaSpec.m @@ -6,10 +6,13 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import "GTDiffDelta.h" -#import "GTDiffPatch.h" +#import +#import +#import -SpecBegin(GTDiffDelta) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTDiffDeltaSpec) __block GTRepository *repository; __block GTDiffDelta *delta; @@ -21,41 +24,41 @@ describe(@"blob-to-blob diffing", ^{ beforeEach(^{ GTBlob *blob1 = [repository lookUpObjectBySHA:@"847cd4b33f4e33bc413468bab016303b50d26d95" error:NULL]; - expect(blob1).notTo.beNil(); + expect(blob1).notTo(beNil()); GTBlob *blob2 = [repository lookUpObjectBySHA:@"6060bdeee91b02cb56d9826b4208e9b34122f3f1" error:NULL]; - expect(blob2).notTo.beNil(); + expect(blob2).notTo(beNil()); delta = [GTDiffDelta diffDeltaFromBlob:blob1 forPath:@"README1.txt" toBlob:blob2 forPath:@"README1.txt" options:nil error:NULL]; - expect(delta).notTo.beNil(); + expect(delta).notTo(beNil()); }); it(@"should generate a patch", ^{ GTDiffPatch *patch = [delta generatePatch:NULL]; - expect(patch).notTo.beNil(); - expect(patch.hunkCount).to.equal(1); - expect(patch.addedLinesCount).to.equal(1); - expect(patch.deletedLinesCount).to.equal(1); + expect(patch).notTo(beNil()); + expect(@(patch.hunkCount)).to(equal(@1)); + expect(@(patch.addedLinesCount)).to(equal(@1)); + expect(@(patch.deletedLinesCount)).to(equal(@1)); }); }); describe(@"blob-to-data diffing", ^{ beforeEach(^{ GTBlob *blob = [repository lookUpObjectBySHA:@"847cd4b33f4e33bc413468bab016303b50d26d95" error:NULL]; - expect(blob).notTo.beNil(); + expect(blob).notTo(beNil()); NSData *data = [@"hello, world" dataUsingEncoding:NSUTF8StringEncoding]; delta = [GTDiffDelta diffDeltaFromBlob:blob forPath:@"README" toData:data forPath:@"README" options:nil error:NULL]; - expect(delta).notTo.beNil(); + expect(delta).notTo(beNil()); }); it(@"should generate a patch", ^{ GTDiffPatch *patch = [delta generatePatch:NULL]; - expect(patch).notTo.beNil(); - expect(patch.hunkCount).to.equal(1); - expect(patch.addedLinesCount).to.equal(1); - expect(patch.deletedLinesCount).to.equal(26); + expect(patch).notTo(beNil()); + expect(@(patch.hunkCount)).to(equal(@1)); + expect(@(patch.addedLinesCount)).to(equal(@1)); + expect(@(patch.deletedLinesCount)).to(equal(@26)); }); }); @@ -64,16 +67,16 @@ NSData *data1 = [@"hello world!\nwhat's up" dataUsingEncoding:NSUTF8StringEncoding]; NSData *data2 = [@"hello, world" dataUsingEncoding:NSUTF8StringEncoding]; delta = [GTDiffDelta diffDeltaFromData:data1 forPath:@"README" toData:data2 forPath:@"README" options:nil error:NULL]; - expect(delta).notTo.beNil(); + expect(delta).notTo(beNil()); }); it(@"should generate a patch", ^{ GTDiffPatch *patch = [delta generatePatch:NULL]; - expect(patch).notTo.beNil(); - expect(patch.hunkCount).to.equal(1); - expect(patch.addedLinesCount).to.equal(1); - expect(patch.deletedLinesCount).to.equal(2); + expect(patch).notTo(beNil()); + expect(@(patch.hunkCount)).to(equal(@1)); + expect(@(patch.addedLinesCount)).to(equal(@1)); + expect(@(patch.deletedLinesCount)).to(equal(@2)); }); }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTDiffSpec.m b/ObjectiveGitTests/GTDiffSpec.m index 7caa53bc5..676dda6bb 100644 --- a/ObjectiveGitTests/GTDiffSpec.m +++ b/ObjectiveGitTests/GTDiffSpec.m @@ -6,56 +6,62 @@ // Copyright (c) 2012 GitHub, Inc. All rights reserved. // -SpecBegin(GTDiff) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTDiffSpec) __block GTRepository *repository = nil; describe(@"GTDiff initialisation", ^{ __block GTCommit *firstCommit = nil; __block GTCommit *secondCommit = nil; - + beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).toNot.beNil(); - + expect(repository).notTo(beNil()); + firstCommit = (GTCommit *)[repository lookUpObjectBySHA:@"8e0e65988d3007867a9f59ca8639ba975ef97e69" objectType:GTObjectTypeCommit error:NULL]; - expect(firstCommit).toNot.beNil(); - + expect(firstCommit).notTo(beNil()); + secondCommit = (GTCommit *)[repository lookUpObjectBySHA:@"a5840674db1a58cac0b2e7d046b627837a16f217" objectType:GTObjectTypeCommit error:NULL]; - expect(secondCommit).toNot.beNil(); + expect(secondCommit).notTo(beNil()); }); - + it(@"should be able to initialise a diff from 2 trees", ^{ - expect([GTDiff diffOldTree:firstCommit.tree withNewTree:secondCommit.tree inRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffOldTree:firstCommit.tree withNewTree:secondCommit.tree inRepository:repository options:nil error:NULL]).notTo(beNil()); }); - + it(@"should be able to initialise a diff against an empty tree", ^{ - expect([GTDiff diffOldTree:nil withNewTree:firstCommit.tree inRepository:repository options:nil error:NULL]).toNot.beNil(); - expect([GTDiff diffOldTree:firstCommit.tree withNewTree:nil inRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffOldTree:nil withNewTree:firstCommit.tree inRepository:repository options:nil error:NULL]).notTo(beNil()); + expect([GTDiff diffOldTree:firstCommit.tree withNewTree:nil inRepository:repository options:nil error:NULL]).notTo(beNil()); }); - + it(@"should be able to initialise a diff against the index with a tree", ^{ - expect([GTDiff diffIndexFromTree:secondCommit.tree inRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffIndexFromTree:secondCommit.tree inRepository:repository options:nil error:NULL]).notTo(beNil()); }); - + it(@"should be able to initialise a diff against the index without a tree", ^{ - expect([GTDiff diffIndexFromTree:nil inRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffIndexFromTree:nil inRepository:repository options:nil error:NULL]).notTo(beNil()); }); - + it(@"should be able to initialise a diff against a working directory and a tree", ^{ - expect([GTDiff diffWorkingDirectoryFromTree:firstCommit.tree inRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffWorkingDirectoryFromTree:firstCommit.tree inRepository:repository options:nil error:NULL]).notTo(beNil()); }); - + it(@"should be able to initialise a diff against a working directory and an empty tree", ^{ - expect([GTDiff diffWorkingDirectoryFromTree:nil inRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffWorkingDirectoryFromTree:nil inRepository:repository options:nil error:NULL]).notTo(beNil()); }); - + it(@"should be able to initialse a diff against an index from a repo's working directory", ^{ - expect([GTDiff diffIndexToWorkingDirectoryInRepository:repository options:nil error:NULL]).toNot.beNil(); + expect([GTDiff diffIndexToWorkingDirectoryInRepository:repository options:nil error:NULL]).notTo(beNil()); }); it(@"should be able to initialize a diff between HEAD and the working directory", ^{ - expect([GTDiff diffWorkingDirectoryToHEADInRepository:repository options:nil error:NULL]).notTo.beNil(); + expect([GTDiff diffWorkingDirectoryToHEADInRepository:repository options:nil error:NULL]).notTo(beNil()); }); }); @@ -64,49 +70,49 @@ __block GTCommit *secondCommit = nil; __block GTDiff *diff = nil; __block void (^setupDiffFromCommitSHAsAndOptions)(NSString *, NSString *, NSDictionary *) = nil; - + beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).toNot.beNil(); - + expect(repository).notTo(beNil()); + setupDiffFromCommitSHAsAndOptions = [^(NSString *firstCommitSHA, NSString *secondCommitSHA, NSDictionary *options) { firstCommit = (GTCommit *)[repository lookUpObjectBySHA:firstCommitSHA objectType:GTObjectTypeCommit error:NULL]; - expect(firstCommit).toNot.beNil(); + expect(firstCommit).notTo(beNil()); secondCommit = (GTCommit *)[repository lookUpObjectBySHA:secondCommitSHA objectType:GTObjectTypeCommit error:NULL]; - expect(secondCommit).toNot.beNil(); - + expect(secondCommit).notTo(beNil()); + diff = [GTDiff diffOldTree:firstCommit.tree withNewTree:secondCommit.tree inRepository:repository options:options error:NULL]; - expect(diff).toNot.beNil(); + expect(diff).notTo(beNil()); } copy]; }); - + it(@"should be able to diff simple file changes", ^{ setupDiffFromCommitSHAsAndOptions(@"be0f001ff517a00b5b8e3c29ee6561e70f994e17", @"fe89ea0a8e70961b8a6344d9660c326d3f2eb0fe", nil); - expect(diff.deltaCount).to.equal(1); - expect([diff numberOfDeltasWithType:GTDiffFileDeltaModified]).to.equal(1); - + expect(@(diff.deltaCount)).to(equal(@1)); + expect(@([diff numberOfDeltasWithType:GTDiffFileDeltaModified])).to(equal(@1)); + [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { NSError *error = nil; GTDiffPatch *patch = [delta generatePatch:&error]; - expect(patch).notTo.beNil(); - expect(error).to.beNil(); + expect(patch).notTo(beNil()); + expect(error).to(beNil()); - expect(delta.oldFile.path).to.equal(@"TestAppWindowController.h"); - expect(delta.oldFile.path).to.equal(delta.newFile.path); - expect(delta.flags & GTDiffFileFlagBinaryMask).to.equal(GTDiffFileFlagNotBinary); - expect(delta.type).to.equal(GTDiffFileDeltaModified); + expect(delta.oldFile.path).to(equal(@"TestAppWindowController.h")); + expect(delta.oldFile.path).to(equal(delta.newFile.path)); + expect(@(delta.flags & GTDiffFileFlagBinaryMask)).to(equal(@(GTDiffFileFlagNotBinary))); + expect(@(delta.type)).to(equal(@(GTDiffFileDeltaModified))); - expect(patch.delta).to.beIdenticalTo(delta); - expect(patch.hunkCount).to.equal(1); - expect(patch.addedLinesCount).to.equal(1); - expect(patch.deletedLinesCount).to.equal(1); - expect(patch.contextLinesCount).to.equal(6); + expect(patch.delta).to(beIdenticalTo(delta)); + expect(@(patch.hunkCount)).to(equal(@1)); + expect(@(patch.addedLinesCount)).to(equal(@1)); + expect(@(patch.deletedLinesCount)).to(equal(@1)); + expect(@(patch.contextLinesCount)).to(equal(@6)); [patch enumerateHunksUsingBlock:^(GTDiffHunk *hunk, BOOL *stop) { - expect(hunk.header).to.equal(@"@@ -4,7 +4,7 @@"); - expect(hunk.lineCount).to.equal(8); - + expect(hunk.header).to(equal(@"@@ -4,7 +4,7 @@")); + expect(@(hunk.lineCount)).to(equal(@8)); + NSArray *expectedLines = @[ @"//", @"// Created by Joe Ricioppo on 9/29/10.", @"// Copyright 2010 __MyCompanyName__. All rights reserved.", @@ -115,159 +121,159 @@ @"", @"#import ", @"#import " ]; - + NSUInteger subtractionLine = 3; NSUInteger additionLine = 4; __block NSUInteger lineIndex = 0; [hunk enumerateLinesInHunk:NULL usingBlock:^(GTDiffLine *line, BOOL *stop) { - expect(line.content).to.equal(expectedLines[lineIndex]); + expect(line.content).to(equal(expectedLines[lineIndex])); if (lineIndex == subtractionLine) { - expect((NSUInteger)line.origin).to.equal(GTDiffLineOriginDeletion); + expect(@(line.origin)).to(equal(@(GTDiffLineOriginDeletion))); } else if (lineIndex == additionLine) { - expect((NSUInteger)line.origin).to.equal(GTDiffLineOriginAddition); + expect(@(line.origin)).to(equal(@(GTDiffLineOriginAddition))); } else { - expect((NSUInteger)line.origin).to.equal(GTDiffLineOriginContext); + expect(@(line.origin)).to(equal(@(GTDiffLineOriginContext))); } - + lineIndex ++; }]; }]; - + // just in case we have failed an above test, don't add a whole bunch // more false failures by iterating again. *stop = YES; }]; }); - + it(@"should recognised added files", ^{ setupDiffFromCommitSHAsAndOptions(@"4d5a6cc7a4d810be71bd47331c947b22580a5997", @"38f1e536cfc2ee41e07d55b38baec00149b2b0d1", nil); - expect(diff.deltaCount).to.equal(1); + expect(@(diff.deltaCount)).to(equal(@1)); [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { - expect(delta.newFile.path).to.equal(@"REAME"); //loltypo - expect(delta.type).to.equal(GTDiffFileDeltaAdded); + expect(delta.newFile.path).to(equal(@"REAME")); //loltypo + expect(@(delta.type)).to(equal(@(GTDiffFileDeltaAdded))); *stop = YES; }]; }); - + it(@"should recognise deleted files", ^{ setupDiffFromCommitSHAsAndOptions(@"6317779b4731d9c837dcc6972b964bdf4211eeef", @"9f90c6e24629fae3ef51101bb6448342b44098ef", nil); - expect(diff.deltaCount).to.equal(1); + expect(@(diff.deltaCount)).to(equal(@1)); [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { - expect(delta.type).to.equal(GTDiffFileDeltaDeleted); + expect(@(delta.type)).to(equal(@(GTDiffFileDeltaDeleted))); *stop = YES; }]; }); - + it(@"should recognise binary files", ^{ setupDiffFromCommitSHAsAndOptions(@"2ba9cdca982ac35a8db29f51c635251374008229", @"524500582248889ef2243931aa7fc48aa21dd12f", nil); - expect(diff.deltaCount).to.equal(1); + expect(@(diff.deltaCount)).to(equal(@1)); [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { // Determine binary/not binary status. [delta generatePatch:NULL]; - expect(delta.flags & GTDiffFileFlagBinaryMask).to.equal(GTDiffFileFlagBinary); + expect(@(delta.flags & GTDiffFileFlagBinaryMask)).to(equal(@(GTDiffFileFlagBinary))); *stop = YES; }]; - + }); - + it(@"should recognise renames", ^{ setupDiffFromCommitSHAsAndOptions(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0", @"6b0c1c8b8816416089c534e474f4c692a76ac14f", nil); [diff findSimilarWithOptions:nil]; - expect(diff.deltaCount).to.equal(1); + expect(@(diff.deltaCount)).to(equal(@1)); [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { - expect(delta.type).to.equal(GTDiffFileDeltaRenamed); - expect(delta.oldFile.path).to.equal(@"README"); - expect(delta.newFile.path).to.equal(@"README_renamed"); + expect(@(delta.type)).to(equal(@(GTDiffFileDeltaRenamed))); + expect(delta.oldFile.path).to(equal(@"README")); + expect(delta.newFile.path).to(equal(@"README_renamed")); *stop = YES; }]; }); - + it(@"should correctly pass options to libgit2", ^{ NSDictionary *options = @{ GTDiffOptionsContextLinesKey: @(5) }; setupDiffFromCommitSHAsAndOptions(@"be0f001ff517a00b5b8e3c29ee6561e70f994e17", @"fe89ea0a8e70961b8a6344d9660c326d3f2eb0fe", options); - expect(diff.deltaCount).to.equal(1); + expect(@(diff.deltaCount)).to(equal(@1)); [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { NSError *error = nil; GTDiffPatch *patch = [delta generatePatch:&error]; - expect(patch).notTo.beNil(); - expect(error).to.beNil(); + expect(patch).notTo(beNil()); + expect(error).to(beNil()); - expect(patch.hunkCount).to.equal(1); - expect(patch.delta).to.beIdenticalTo(delta); + expect(@(patch.hunkCount)).to(equal(@1)); + expect(patch.delta).to(beIdenticalTo(delta)); [patch enumerateHunksUsingBlock:^(GTDiffHunk *hunk, BOOL *stop) { __block NSUInteger contextCount = 0; [hunk enumerateLinesInHunk:NULL usingBlock:^(GTDiffLine *line, BOOL *stop) { if (line.origin == GTDiffLineOriginContext) contextCount ++; }]; - expect(contextCount).to.equal(10); + expect(@(contextCount)).to(equal(@10)); *stop = YES; }]; *stop = YES; }]; }); - + it(@"should correctly limit itself to a given pathspec", ^{ NSDictionary *options = @{ GTDiffOptionsPathSpecArrayKey: @[ @"ladflbahjgdf" ] }; setupDiffFromCommitSHAsAndOptions(@"be0f001ff517a00b5b8e3c29ee6561e70f994e17", @"fe89ea0a8e70961b8a6344d9660c326d3f2eb0fe", options); - expect(diff.deltaCount).to.equal(0); - + expect(@(diff.deltaCount)).to(equal(@0)); + options = @{ GTDiffOptionsPathSpecArrayKey: @[ @"TestAppWindowController.h" ] }; setupDiffFromCommitSHAsAndOptions(@"be0f001ff517a00b5b8e3c29ee6561e70f994e17", @"fe89ea0a8e70961b8a6344d9660c326d3f2eb0fe", options); - expect(diff.deltaCount).to.equal(1); + expect(@(diff.deltaCount)).to(equal(@1)); }); - + it(@"should correctly recognise binary and text files", ^{ setupDiffFromCommitSHAsAndOptions(@"6b0c1c8b8816416089c534e474f4c692a76ac14f", @"a4bca6b67a5483169963572ee3da563da33712f7", nil); - expect(diff.deltaCount).to.equal(3); - + expect(@(diff.deltaCount)).to(equal(@3)); + NSDictionary *expectedBinaryness = @{ @"README.md": @(NO), @"hero_slide1.png": @(YES), @"jquery-1.8.1.min.js": @(NO) }; [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { // Determine binary/not binary status. [delta generatePatch:NULL]; if ([expectedBinaryness[delta.newFile.path] boolValue]) { - expect(delta.flags & GTDiffFileFlagBinaryMask).to.equal(GTDiffFileFlagBinary); + expect(@(delta.flags & GTDiffFileFlagBinaryMask)).to(equal(@(GTDiffFileFlagBinary))); } else { - expect(delta.flags & GTDiffFileFlagBinaryMask).to.equal(GTDiffFileFlagNotBinary); + expect(@(delta.flags & GTDiffFileFlagBinaryMask)).to(equal(@(GTDiffFileFlagNotBinary))); } }]; }); - + it(@"shouldn't choke on totally cray diffs", ^{ setupDiffFromCommitSHAsAndOptions(@"6b0c1c8b8816416089c534e474f4c692a76ac14f", @"a4bca6b67a5483169963572ee3da563da33712f7", nil); - + [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { if (![delta.newFile.path isEqualToString:@"jquery-1.8.1.min.js"]) return; NSError *error = nil; GTDiffPatch *patch = [delta generatePatch:&error]; - expect(patch).notTo.beNil(); - expect(error).to.beNil(); - - expect(patch.hunkCount).to.equal(1); - expect(patch.delta).to.beIdenticalTo(delta); + expect(patch).notTo(beNil()); + expect(error).to(beNil()); + + expect(@(patch.hunkCount)).to(equal(@1)); + expect(patch.delta).to(beIdenticalTo(delta)); [patch enumerateHunksUsingBlock:^(GTDiffHunk *hunk, BOOL *stop) { - expect(hunk.lineCount).to.equal(3); + expect(@(hunk.lineCount)).to(equal(@3)); *stop = YES; }]; - + *stop = YES; }]; }); - + it(@"should correctly find untracked files if asked", ^{ diff = [GTDiff diffIndexToWorkingDirectoryInRepository:repository options:@{ GTDiffOptionsFlagsKey: @(GTDiffOptionsFlagsIncludeUntracked) } error:NULL]; @@ -275,11 +281,11 @@ [diff enumerateDeltasUsingBlock:^(GTDiffDelta *delta, BOOL *stop) { if (![delta.newFile.path isEqualToString:@"UntrackedImage.png"]) return; - foundImage = YES; + foundImage = YES; *stop = YES; }]; - - expect(foundImage).to.beTruthy(); + + expect(@(foundImage)).to(beTruthy()); }); }); @@ -287,4 +293,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTEnumeratorSpec.m b/ObjectiveGitTests/GTEnumeratorSpec.m index 2577a9655..c88abcc8e 100644 --- a/ObjectiveGitTests/GTEnumeratorSpec.m +++ b/ObjectiveGitTests/GTEnumeratorSpec.m @@ -6,37 +6,41 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTEnumerator.h" +#import +#import +#import -SpecBegin(GTEnumerator) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTEnumeratorSpec) __block GTRepository *repo; __block GTEnumerator *enumerator; beforeEach(^{ repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); + expect(repo).notTo(beNil()); enumerator = [[GTEnumerator alloc] initWithRepository:repo error:NULL]; - expect(enumerator).notTo.beNil(); + expect(enumerator).notTo(beNil()); }); it(@"should walk from repository HEAD", ^{ NSError *error = nil; GTReference *HEADRef = [repo headReferenceWithError:NULL]; - expect(HEADRef).notTo.beNil(); - + expect(HEADRef).notTo(beNil()); + [enumerator pushSHA:HEADRef.targetSHA error:NULL]; NSUInteger count = [enumerator allObjects].count; - expect(count).to.equal(3); - expect(error).to.beNil(); + expect(@(count)).to(equal(@3)); + expect(error).to(beNil()); }); describe(@"with a rev list", ^{ __block NSMutableArray *expectedSHAs; __block void (^verifyEnumerator)(void); - + beforeEach(^{ expectedSHAs = [@[ @"9fd738e8f7967c078dceed8190330fc8648ee56a", @@ -47,21 +51,21 @@ verifyEnumerator = ^{ __block NSError *error = nil; - expect([enumerator pushSHA:expectedSHAs[0] error:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([enumerator pushSHA:expectedSHAs[0] error:&error])).to(beTruthy()); + expect(error).to(beNil()); NSMutableArray *SHAs = [NSMutableArray array]; for (GTCommit *commit in enumerator) { - expect(commit).to.beKindOf(GTCommit.class); + expect(commit).to(beAnInstanceOf(GTCommit.class)); [SHAs addObject:commit.SHA]; } - expect(SHAs).to.equal(expectedSHAs); + expect(SHAs).to(equal(expectedSHAs)); __block BOOL success; - expect([enumerator nextObjectWithSuccess:&success error:&error]).to.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect([enumerator nextObjectWithSuccess:&success error:&error]).to(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }; }); @@ -77,20 +81,20 @@ it(@"should hide a SHA", ^{ __block NSError *error = nil; - expect([enumerator hideSHA:expectedSHAs[2] error:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([enumerator hideSHA:expectedSHAs[2] error:&error])).to(beTruthy()); + expect(error).to(beNil()); [expectedSHAs removeObjectsInRange:NSMakeRange(2, expectedSHAs.count - 2)]; verifyEnumerator(); }); it(@"should reset with options", ^{ - expect(enumerator.options).to.equal(GTEnumeratorOptionsNone); + expect(@(enumerator.options)).to(equal(@(GTEnumeratorOptionsNone))); verifyEnumerator(); [enumerator resetWithOptions:GTEnumeratorOptionsTimeSort]; - expect(enumerator.options).to.equal(GTEnumeratorOptionsTimeSort); + expect(@(enumerator.options)).to(equal(@(GTEnumeratorOptionsTimeSort))); verifyEnumerator(); }); }); @@ -100,7 +104,7 @@ __block NSMutableArray *expectedSHAs; __block void (^verifyEnumerator)(void); - + beforeEach(^{ expectedSHAs = [@[ @"36060c58702ed4c2a40832c51758d5344201d89a", @@ -114,32 +118,32 @@ [SHAs addObject:commit.SHA]; } - expect(SHAs).to.equal(expectedSHAs); + expect(SHAs).to(equal(expectedSHAs)); __block NSError *error = nil; __block BOOL success; - expect([enumerator nextObjectWithSuccess:&success error:&error]).to.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect([enumerator nextObjectWithSuccess:&success error:&error]).to(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }; }); it(@"should push a glob", ^{ __block NSError *error = nil; - expect([enumerator pushGlob:branchGlob error:&error]).to.beTruthy(); - expect(error).to.beNil(); - + expect(@([enumerator pushGlob:branchGlob error:&error])).to(beTruthy()); + expect(error).to(beNil()); + verifyEnumerator(); }); it(@"should hide a glob", ^{ __block NSError *error = nil; - expect([enumerator pushSHA:expectedSHAs[0] error:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([enumerator pushSHA:expectedSHAs[0] error:&error])).to(beTruthy()); + expect(error).to(beNil()); + + expect(@([enumerator hideGlob:branchGlob error:&error])).to(beTruthy()); + expect(error).to(beNil()); - expect([enumerator hideGlob:branchGlob error:&error]).to.beTruthy(); - expect(error).to.beNil(); - [expectedSHAs removeAllObjects]; verifyEnumerator(); }); @@ -149,4 +153,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTFilterListSpec.m b/ObjectiveGitTests/GTFilterListSpec.m index a63f21870..f093dfe0c 100644 --- a/ObjectiveGitTests/GTFilterListSpec.m +++ b/ObjectiveGitTests/GTFilterListSpec.m @@ -6,10 +6,13 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import "GTFilter.h" -#import "GTFilterList.h" +#import +#import +#import -SpecBegin(GTFilterList) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTFilterListSpec) __block GTRepository *repository; @@ -24,7 +27,7 @@ NSString *attributes = @"READ* rf=true\n*.txt tf=true\n"; BOOL success = [attributes writeToURL:[repository.fileURL URLByAppendingPathComponent:@".gitattributes"] atomically:YES encoding:NSUTF8StringEncoding error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); readFilter = [[GTFilter alloc] initWithName:@"read-filter" attributes:@"rf=true" applyBlock:^(void **payload, NSData *from, GTFilterSource *source, BOOL *applied) { NSMutableData *buffer = [from mutableCopy]; @@ -33,8 +36,8 @@ return buffer; }]; - expect(readFilter).notTo.beNil(); - expect([readFilter registerWithPriority:1 error:NULL]).to.beTruthy(); + expect(readFilter).notTo(beNil()); + expect(@([readFilter registerWithPriority:1 error:NULL])).to(beTruthy()); textFilter = [[GTFilter alloc] initWithName:@"text-filter" attributes:@"tf=true" applyBlock:^(void **payload, NSData *from, GTFilterSource *source, BOOL *applied) { NSMutableData *buffer = [from mutableCopy]; @@ -43,13 +46,13 @@ return buffer; }]; - expect(textFilter).notTo.beNil(); - expect([textFilter registerWithPriority:0 error:NULL]).to.beTruthy(); + expect(textFilter).notTo(beNil()); + expect(@([textFilter registerWithPriority:0 error:NULL])).to(beTruthy()); }); afterEach(^{ - expect([readFilter unregister:NULL]).to.beTruthy(); - expect([textFilter unregister:NULL]).to.beTruthy(); + expect(@([readFilter unregister:NULL])).to(beTruthy()); + expect(@([textFilter unregister:NULL])).to(beTruthy()); }); describe(@"loading a filter list", ^{ @@ -63,52 +66,52 @@ it(@"should return nil on a path without any filters", ^{ GTFilterList *list = [repository filterListWithPath:@"TestAppDelegate.h" blob:nil mode:GTFilterSourceModeSmudge options:GTFilterListOptionsDefault success:&success error:&error]; - expect(list).to.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(list).to(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should return non-nil on a path with a single filter", ^{ GTFilterList *list = [repository filterListWithPath:@"README.md" blob:nil mode:GTFilterSourceModeSmudge options:GTFilterListOptionsDefault success:&success error:&error]; - expect(list).notTo.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(list).notTo(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should return non-nil on a path with multiple filters", ^{ GTFilterList *list = [repository filterListWithPath:@"README1.txt" blob:nil mode:GTFilterSourceModeSmudge options:GTFilterListOptionsDefault success:&success error:&error]; - expect(list).notTo.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(list).notTo(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should return non-nil on a nonexistent path with a blob", ^{ NSData *data = [@"haters gonna haaaate" dataUsingEncoding:NSUTF8StringEncoding]; GTBlob *blob = [[GTBlob alloc] initWithData:data inRepository:repository error:NULL]; - expect(blob).notTo.beNil(); + expect(blob).notTo(beNil()); GTFilterList *list = [repository filterListWithPath:@"haters-gonna-hate.txt" blob:blob mode:GTFilterSourceModeClean options:GTFilterListOptionsDefault success:&success error:&error]; - expect(list).notTo.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(list).notTo(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); }); it(@"should apply a single filter", ^{ GTFilterList *list = [repository filterListWithPath:@"README.md" blob:nil mode:GTFilterSourceModeSmudge options:GTFilterListOptionsDefault success:NULL error:NULL]; - expect(list).notTo.beNil(); + expect(list).notTo(beNil()); NSString *inputString = @"foobar"; NSError *error = nil; NSData *result = [list applyToData:[inputString dataUsingEncoding:NSUTF8StringEncoding] error:&error]; - expect(result).notTo.beNil(); - expect(error).to.beNil(); + expect(result).notTo(beNil()); + expect(error).to(beNil()); NSString *resultString = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; - expect(resultString).to.contain(inputString); - expect(resultString).to.contain(readFilterContent); - expect(resultString).notTo.contain(textFilterContent); + expect(resultString).to(beginWith(inputString)); + expect(resultString).to(endWith(readFilterContent)); + expect(resultString).notTo(contain(textFilterContent)); }); describe(@"applying a list of multiple filters", ^{ @@ -117,7 +120,7 @@ beforeEach(^{ // This file should have `readFilter` applied first, then `textFilter`. list = [repository filterListWithPath:@"README1.txt" blob:nil mode:GTFilterSourceModeSmudge options:GTFilterListOptionsDefault success:NULL error:NULL]; - expect(list).notTo.beNil(); + expect(list).notTo(beNil()); }); afterEach(^{ @@ -130,13 +133,13 @@ NSError *error = nil; NSData *result = [list applyToData:[inputString dataUsingEncoding:NSUTF8StringEncoding] error:&error]; - expect(result).notTo.beNil(); - expect(error).to.beNil(); + expect(result).notTo(beNil()); + expect(error).to(beNil()); NSString *resultString = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; - expect(resultString).to.contain(inputString); - expect(resultString).to.contain(readFilterContent); - expect(resultString).to.contain(textFilterContent); + expect(resultString).to(beginWith(inputString)); + expect(resultString).to(endWith(readFilterContent)); + expect(@([resultString rangeOfString:textFilterContent].location)).notTo(equal(@(NSNotFound))); }); it(@"should apply to a file", ^{ @@ -144,38 +147,38 @@ GTRepository *inputRepo = self.conflictedFixtureRepository; NSString *content = [NSString stringWithContentsOfURL:[inputRepo.fileURL URLByAppendingPathComponent:inputFilename] encoding:NSUTF8StringEncoding error:NULL]; - expect(content).notTo.contain(readFilterContent); - expect(content).notTo.contain(textFilterContent); + expect(content).notTo(contain(readFilterContent)); + expect(content).notTo(contain(textFilterContent)); NSError *error = nil; NSData *result = [list applyToPath:inputFilename inRepository:inputRepo error:&error]; - expect(result).notTo.beNil(); - expect(error).to.beNil(); + expect(result).notTo(beNil()); + expect(error).to(beNil()); NSString *resultString = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; - expect(resultString).to.contain(content); - expect(resultString).to.contain(readFilterContent); - expect(resultString).to.contain(textFilterContent); + expect(resultString).to(beginWith(content)); + expect(resultString).to(endWith(readFilterContent)); + expect(@([resultString rangeOfString:textFilterContent].location)).notTo(equal(@(NSNotFound))); }); it(@"should apply to a blob", ^{ // This is `REAME_` from `HEAD`. GTBlob *blob = [repository lookUpObjectBySHA:@"8b4a21733703ca50b96186691615e8d2f6314e79" objectType:GTObjectTypeBlob error:NULL]; - expect(blob).notTo.beNil(); + expect(blob).notTo(beNil()); - expect(blob.content).notTo.beNil(); - expect(blob.content).notTo.contain(readFilterContent); - expect(blob.content).notTo.contain(textFilterContent); + expect(blob.content).notTo(beNil()); + expect(blob.content).notTo(contain(readFilterContent)); + expect(blob.content).notTo(contain(textFilterContent)); NSError *error = nil; NSData *result = [list applyToBlob:blob error:&error]; - expect(result).notTo.beNil(); - expect(error).to.beNil(); + expect(result).notTo(beNil()); + expect(error).to(beNil()); NSString *resultString = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; - expect(resultString).to.contain(blob.content); - expect(resultString).to.contain(readFilterContent); - expect(resultString).to.contain(textFilterContent); + expect(resultString).to(beginWith(blob.content)); + expect(resultString).to(endWith(readFilterContent)); + expect(@([resultString rangeOfString:textFilterContent].location)).notTo(equal(@(NSNotFound))); }); }); @@ -183,4 +186,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTFilterSpec.m b/ObjectiveGitTests/GTFilterSpec.m index 4e7b923af..2f969e731 100644 --- a/ObjectiveGitTests/GTFilterSpec.m +++ b/ObjectiveGitTests/GTFilterSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import "GTFilter.h" +#import +#import +#import -SpecBegin(GTFilter) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTFilterSpec) static NSString * const testFile = @"stuff.txt"; static NSString * const filterName = @"special-filter"; @@ -25,14 +29,14 @@ beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); NSString *attributes = @"*.txt special\n"; BOOL success = [attributes writeToURL:[repository.fileURL URLByAppendingPathComponent:@".gitattributes"] atomically:YES encoding:NSUTF8StringEncoding error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); success = [@"some stuff" writeToURL:[repository.fileURL URLByAppendingPathComponent:testFile] atomically:YES encoding:NSUTF8StringEncoding error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); setUpFilterWithApplyBlock = ^(GTFilterApplyBlock applyBlock) { applyBlock = applyBlock ?: ^ NSData * (void **payload, NSData *from, GTFilterSource *source, BOOL *applied) { @@ -42,30 +46,30 @@ filter = [[GTFilter alloc] initWithName:filterName attributes:filterAttributes applyBlock:applyBlock]; BOOL success = [filter registerWithPriority:0 error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); }; addTestFileToIndex = ^{ GTIndex *index = [repository indexWithError:NULL]; - expect(index).notTo.beNil(); + expect(index).notTo(beNil()); BOOL success = [index addFile:@"stuff.txt" error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); success = [index write:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); }; }); afterEach(^{ BOOL success = [filter unregister:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); }); it(@"should be able to look up a registered filter by name", ^{ setUpFilterWithApplyBlock(nil); GTFilter *filter = [GTFilter filterForName:filterName]; - expect(filter).notTo.beNil(); + expect(filter).notTo(beNil()); }); it(@"should call all the blocks", ^{ @@ -93,10 +97,10 @@ addTestFileToIndex(); - expect(initializeCalled).to.beTruthy(); - expect(checkCalled).to.beTruthy(); - expect(applyCalled).to.beTruthy(); - expect(cleanupCalled).to.beTruthy(); + expect(@(initializeCalled)).to(beTruthy()); + expect(@(checkCalled)).to(beTruthy()); + expect(@(applyCalled)).to(beTruthy()); + expect(@(cleanupCalled)).to(beTruthy()); }); it(@"shouldn't call the apply block if the check block returns NO", ^{ @@ -112,7 +116,7 @@ addTestFileToIndex(); - expect(applyCalled).to.beFalsy(); + expect(@(applyCalled)).to(beFalsy()); }); describe(@"application", ^{ @@ -128,23 +132,23 @@ GTTree *tree = [index writeTree:NULL]; GTTreeEntry *entry = [tree entryWithName:testFile]; GTOdbObject *ODBObject = [[entry GTObject:NULL] odbObjectWithError:NULL]; - expect(ODBObject.data).to.equal(replacementData); + expect(ODBObject.data).to(equal(replacementData)); }); it(@"should write the data returned by the apply block when smudged", ^{ addTestFileToIndex(); GTIndex *index = [repository indexWithError:NULL]; GTTree *tree = [index writeTree:NULL]; - expect(tree).notTo.beNil(); + expect(tree).notTo(beNil()); GTReference *HEADRef = [repository headReferenceWithError:NULL]; - expect(HEADRef).notTo.beNil(); + expect(HEADRef).notTo(beNil()); GTCommit *HEADCommit = HEADRef.resolvedTarget; - expect(HEADCommit).notTo.beNil(); + expect(HEADCommit).notTo(beNil()); GTCommit *newCommit = [repository createCommitWithTree:tree message:@"" parents:@[ HEADCommit ] updatingReferenceNamed:HEADRef.name error:NULL]; - expect(newCommit).notTo.beNil(); + expect(newCommit).notTo(beNil()); NSData *replacementData = [@"you're my favorite customer" dataUsingEncoding:NSUTF8StringEncoding]; setUpFilterWithApplyBlock(^(void **payload, NSData *from, GTFilterSource *source, BOOL *applied) { @@ -153,12 +157,12 @@ NSURL *testFileURL = [repository.fileURL URLByAppendingPathComponent:testFile]; BOOL success = [NSFileManager.defaultManager removeItemAtURL:testFileURL error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); success = [repository checkoutCommit:newCommit strategy:GTCheckoutStrategyForce error:NULL progressBlock:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); - expect([NSData dataWithContentsOfURL:testFileURL]).to.equal(replacementData); + expect([NSData dataWithContentsOfURL:testFileURL]).to(equal(replacementData)); }); }); @@ -173,14 +177,14 @@ addTestFileToIndex(); - expect(filterSource).notTo.beNil(); - expect(filterSource.path).to.equal(testFile); - expect(filterSource.mode).to.equal(GTFilterSourceModeClean); - expect(filterSource.repositoryURL).to.equal(repository.fileURL); + expect(filterSource).notTo(beNil()); + expect(filterSource.path).to(equal(testFile)); + expect(@(filterSource.mode)).to(equal(@(GTFilterSourceModeClean))); + expect(filterSource.repositoryURL).to(equal(repository.fileURL)); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTIndexSpec.m b/ObjectiveGitTests/GTIndexSpec.m index d9da6af36..222e82501 100644 --- a/ObjectiveGitTests/GTIndexSpec.m +++ b/ObjectiveGitTests/GTIndexSpec.m @@ -6,10 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTIndex.h" -#import "GTConfiguration.h" +#import +#import +#import -SpecBegin(GTIndex) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTIndexSpec) __block GTRepository *repository; __block GTIndex *index; @@ -18,33 +21,33 @@ repository = self.testAppFixtureRepository; index = [repository indexWithError:NULL]; - expect(index).notTo.beNil(); + expect(index).notTo(beNil()); BOOL success = [index refresh:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); }); it(@"should count the entries", ^{ - expect(index.entryCount).to.equal(24); + expect(@(index.entryCount)).to(equal(@24)); }); it(@"should clear all entries", ^{ [index clear:NULL]; - expect(index.entryCount).to.equal(0); + expect(@(index.entryCount)).to(equal(@0)); }); it(@"should read entry properties", ^{ GTIndexEntry *entry = [index entryAtIndex:0]; - expect(entry).notTo.beNil(); - expect(entry.path).to.equal(@".gitignore"); - expect(entry.staged).to.beFalsy(); + expect(entry).notTo(beNil()); + expect(entry.path).to(equal(@".gitignore")); + expect(@(entry.staged)).to(beFalsy()); }); it(@"should write to the repository and return a tree", ^{ GTTree *tree = [index writeTree:NULL]; - expect(tree).notTo.beNil(); - expect(tree.entryCount).to.equal(23); - expect(tree.repository).to.equal(repository); + expect(tree).notTo(beNil()); + expect(@(tree.entryCount)).to(equal(@23)); + expect(tree.repository).to(equal(repository)); }); it(@"should write to a specific repository and return a tree", ^{ @@ -53,44 +56,44 @@ GTCommit *masterCommit = [branches[0] targetCommitAndReturnError:NULL]; GTCommit *packedCommit = [branches[1] targetCommitAndReturnError:NULL]; - expect(masterCommit).notTo.beNil(); - expect(packedCommit).notTo.beNil(); + expect(masterCommit).notTo(beNil()); + expect(packedCommit).notTo(beNil()); GTIndex *index = [masterCommit.tree merge:packedCommit.tree ancestor:NULL error:NULL]; GTTree *mergedTree = [index writeTreeToRepository:repository error:NULL]; - expect(index).notTo.beNil(); - expect(mergedTree).notTo.beNil(); - expect(mergedTree.entryCount).to.equal(5); - expect(mergedTree.repository).to.equal(repository); + expect(index).notTo(beNil()); + expect(mergedTree).notTo(beNil()); + expect(@(mergedTree.entryCount)).to(equal(@5)); + expect(mergedTree.repository).to(equal(repository)); }); it(@"should create an index in memory", ^{ GTIndex *memoryIndex = [GTIndex inMemoryIndexWithRepository:repository error:NULL]; - expect(memoryIndex).notTo.beNil(); - expect(memoryIndex.fileURL).to.beNil(); + expect(memoryIndex).notTo(beNil()); + expect(memoryIndex.fileURL).to(beNil()); }); it(@"should add the contents of a tree", ^{ GTCommit *headCommit = [repository lookUpObjectByRevParse:@"HEAD" error:NULL]; - expect(headCommit).notTo.beNil(); + expect(headCommit).notTo(beNil()); GTTree *headTree = headCommit.tree; - expect(headTree.entryCount).to.beGreaterThan(0); + expect(@(headTree.entryCount)).to(beGreaterThan(@0)); GTIndex *memoryIndex = [GTIndex inMemoryIndexWithRepository:index.repository error:NULL]; - expect(memoryIndex).notTo.beNil(); - expect(memoryIndex.entryCount).to.equal(0); + expect(memoryIndex).notTo(beNil()); + expect(@(memoryIndex.entryCount)).to(equal(@0)); BOOL success = [memoryIndex addContentsOfTree:headTree error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); [headTree enumerateEntriesWithOptions:GTTreeEnumerationOptionPre error:NULL block:^(GTTreeEntry *treeEntry, NSString *root, BOOL *stop) { if (treeEntry.type == GTObjectTypeBlob) { NSString *path = [root stringByAppendingString:treeEntry.name]; GTIndexEntry *indexEntry = [memoryIndex entryWithName:path]; - expect(indexEntry).notTo.beNil(); + expect(indexEntry).notTo(beNil()); } return YES; @@ -99,7 +102,7 @@ describe(@"conflict enumeration", ^{ it(@"should correctly find no conflicts", ^{ - expect(index.hasConflicts).to.beFalsy(); + expect(@(index.hasConflicts)).to(beFalsy()); }); it(@"should immediately return YES when enumerating no conflicts", ^{ @@ -107,31 +110,31 @@ BOOL enumerationResult = [index enumerateConflictedFilesWithError:NULL usingBlock:^(GTIndexEntry *ancestor, GTIndexEntry *ours, GTIndexEntry *theirs, BOOL *stop) { blockRan = YES; }]; - expect(enumerationResult).to.beTruthy(); - expect(blockRan).to.beFalsy(); + expect(@(enumerationResult)).to(beTruthy()); + expect(@(blockRan)).to(beFalsy()); }); it(@"should correctly report conflicts", ^{ index = [self.conflictedFixtureRepository indexWithError:NULL]; - expect(index).notTo.beNil(); - expect(index.hasConflicts).to.beTruthy(); + expect(index).notTo(beNil()); + expect(@(index.hasConflicts)).to(beTruthy()); }); it(@"should enumerate conflicts successfully", ^{ index = [self.conflictedFixtureRepository indexWithError:NULL]; - expect(index).notTo.beNil(); + expect(index).notTo(beNil()); NSError *err = NULL; __block NSUInteger count = 0; NSArray *expectedPaths = @[ @"TestAppDelegate.h", @"main.m" ]; BOOL enumerationResult = [index enumerateConflictedFilesWithError:&err usingBlock:^(GTIndexEntry *ancestor, GTIndexEntry *ours, GTIndexEntry *theirs, BOOL *stop) { - expect(ours.path).to.equal(expectedPaths[count]); + expect(ours.path).to(equal(expectedPaths[count])); count ++; }]; - expect(enumerationResult).to.beTruthy(); - expect(err).to.beNil(); - expect(count).to.equal(2); + expect(@(enumerationResult)).to(beTruthy()); + expect(err).to(beNil()); + expect(@(count)).to(equal(@2)); }); }); @@ -142,19 +145,19 @@ NSString *filePath = [self.testAppFixtureRepository.fileURL.path stringByAppendingPathComponent:fileName]; [@"The wild west..." writeToFile:filePath atomically:NO encoding:NSUTF8StringEncoding error:NULL]; - expect(index).toNot.beNil(); - expect([index.repository statusForFile:fileName success:NULL error:NULL]).to.equal(GTFileStatusModifiedInWorktree); + expect(index).notTo(beNil()); + expect(@([index.repository statusForFile:fileName success:NULL error:NULL])).to(equal(@(GTFileStatusModifiedInWorktree))); }); it(@"should update the Index", ^{ BOOL success = [index updatePathspecs:@[ fileName ] error:NULL passingTest:^(NSString *matchedPathspec, NSString *path, BOOL *stop) { - expect(matchedPathspec).to.equal(fileName); - expect(path).to.equal(fileName); + expect(matchedPathspec).to(equal(fileName)); + expect(path).to(equal(fileName)); return YES; }]; - expect(success).to.beTruthy(); - expect([index.repository statusForFile:fileName success:NULL error:NULL]).to.equal(GTFileStatusModifiedInIndex); + expect(@(success)).to(beTruthy()); + expect(@([index.repository statusForFile:fileName success:NULL error:NULL])).to(equal(@(GTFileStatusModifiedInIndex))); }); it(@"should skip a specific file", ^{ @@ -166,8 +169,8 @@ } }]; - expect(success).to.beTruthy(); - expect([index.repository statusForFile:fileName success:NULL error:NULL]).to.equal(GTFileStatusModifiedInWorktree); + expect(@(success)).to(beTruthy()); + expect(@([index.repository statusForFile:fileName success:NULL error:NULL])).to(equal(@(GTFileStatusModifiedInWorktree))); }); it(@"should stop be able to stop early", ^{ @@ -181,9 +184,9 @@ return YES; }]; - expect(success).to.beTruthy(); - expect([index.repository statusForFile:fileName success:NULL error:NULL]).to.equal(GTFileStatusModifiedInIndex); - expect([index.repository statusForFile:otherFileName success:NULL error:NULL]).equal(GTFileStatusModifiedInWorktree); + expect(@(success)).to(beTruthy()); + expect(@([index.repository statusForFile:fileName success:NULL error:NULL])).to(equal(@(GTFileStatusModifiedInIndex))); + expect(@([index.repository statusForFile:otherFileName success:NULL error:NULL])).to(equal(@(GTFileStatusModifiedInWorktree))); }); }); @@ -202,18 +205,18 @@ BOOL (^fileStatusEqualsExpected)(NSString *filename, GTStatusDeltaStatus headToIndexStatus, GTStatusDeltaStatus indexToWorkingDirectoryStatus) = ^(NSString *filename, GTStatusDeltaStatus headToIndexStatus, GTStatusDeltaStatus indexToWorkingDirectoryStatus) { return [index.repository enumerateFileStatusWithOptions:renamedOptions error:NULL usingBlock:^(GTStatusDelta *headToIndex, GTStatusDelta *indexToWorkingDirectory, BOOL *stop) { if (![headToIndex.newFile.path isEqualToString:filename]) return; - expect(headToIndex.status).to.equal(headToIndexStatus); - expect(indexToWorkingDirectory.status).to.equal(indexToWorkingDirectoryStatus); + expect(@(headToIndex.status)).to(equal(@(headToIndexStatus))); + expect(@(indexToWorkingDirectory.status)).to(equal(@(indexToWorkingDirectoryStatus))); }]; }; beforeEach(^{ - expect(filename).to.equal([filename precomposedStringWithCanonicalMapping]); + expect(filename).to(equal([filename precomposedStringWithCanonicalMapping])); repo = self.testUnicodeFixtureRepository; configuration = [repo configurationWithError:NULL]; [configuration setBool:false forKey:@"core.precomposeunicode"]; - expect([configuration boolForKey:@"core.precomposeunicode"]).to.beFalsy(); + expect(@([configuration boolForKey:@"core.precomposeunicode"])).to(beFalsy()); index = [repo indexWithError:NULL]; @@ -227,49 +230,49 @@ it(@"it preserves decomposed Unicode in index paths with precomposeunicode disabled", ^{ NSString *decomposedFilename = [filename decomposedStringWithCanonicalMapping]; GTIndexEntry *entry = [index entryWithName:decomposedFilename error:NULL]; - expect(fileStatusEqualsExpected(entry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusUnmodified)).to.beTruthy(); + expect(@(fileStatusEqualsExpected(entry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusUnmodified))).to(beTruthy()); - expect([[NSFileManager defaultManager] moveItemAtURL:fileURL toURL:renamedFileURL error:NULL]).to.beTruthy(); + expect(@([[NSFileManager defaultManager] moveItemAtURL:fileURL toURL:renamedFileURL error:NULL])).to(beTruthy()); entry = [index entryWithName:decomposedFilename error:NULL]; - expect(fileStatusEqualsExpected(entry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusDeleted)).to.beTruthy(); + expect(@(fileStatusEqualsExpected(entry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusDeleted))).to(beTruthy()); [index removeFile:filename error:NULL]; [index addFile:renamedFilename error:NULL]; [index write:NULL]; entry = [index entryWithName:[renamedFilename decomposedStringWithCanonicalMapping] error:NULL]; - expect(fileStatusEqualsExpected(entry.path, GTStatusDeltaStatusRenamed, GTStatusDeltaStatusUnmodified)).to.beTruthy(); + expect(@(fileStatusEqualsExpected(entry.path, GTStatusDeltaStatusRenamed, GTStatusDeltaStatusUnmodified))).to(beTruthy()); }); it(@"it preserves precomposed Unicode in index paths with precomposeunicode enabled", ^{ GTIndexEntry *fileEntry = [index entryWithName:[filename decomposedStringWithCanonicalMapping] error:NULL]; - expect(fileEntry).toNot.beNil(); - expect(fileStatusEqualsExpected(fileEntry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusUnmodified)).to.beTruthy(); + expect(fileEntry).notTo(beNil()); + expect(@(fileStatusEqualsExpected(fileEntry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusUnmodified))).to(beTruthy()); [configuration setBool:true forKey:@"core.precomposeunicode"]; - expect([configuration boolForKey:@"core.precomposeunicode"]).to.beTruthy(); + expect(@([configuration boolForKey:@"core.precomposeunicode"])).to(beTruthy()); GTIndexEntry *decomposedFileEntry = [index entryWithName:[filename decomposedStringWithCanonicalMapping] error:NULL]; - expect(decomposedFileEntry).toNot.beNil(); - expect(fileStatusEqualsExpected(decomposedFileEntry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusDeleted)).to.beTruthy(); + expect(decomposedFileEntry).notTo(beNil()); + expect(@(fileStatusEqualsExpected(decomposedFileEntry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusDeleted))).to(beTruthy()); - expect([[NSFileManager defaultManager] moveItemAtURL:fileURL toURL:renamedFileURL error:NULL]).to.beTruthy(); + expect(@([[NSFileManager defaultManager] moveItemAtURL:fileURL toURL:renamedFileURL error:NULL])).to(beTruthy()); GTIndexEntry *precomposedFileEntry = [index entryWithName:filename error:NULL]; - expect(precomposedFileEntry).to.beNil(); + expect(precomposedFileEntry).to(beNil()); decomposedFileEntry = [index entryWithName:[filename decomposedStringWithCanonicalMapping] error:NULL]; - expect(decomposedFileEntry).toNot.beNil(); - expect(fileStatusEqualsExpected(decomposedFileEntry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusDeleted)).to.beTruthy(); + expect(decomposedFileEntry).notTo(beNil()); + expect(@(fileStatusEqualsExpected(decomposedFileEntry.path, GTStatusDeltaStatusUnmodified, GTStatusDeltaStatusDeleted))).to(beTruthy()); [index removeFile:filename error:NULL]; [index addFile:renamedFilename error:NULL]; [index write:NULL]; GTIndexEntry *precomposedRenamedFileEntry = [index entryWithName:renamedFilename error:NULL]; - expect(precomposedRenamedFileEntry).toNot.beNil(); - expect(fileStatusEqualsExpected(precomposedFileEntry.path, GTStatusDeltaStatusRenamed, GTStatusDeltaStatusUntracked)).to.beTruthy(); + expect(precomposedRenamedFileEntry).notTo(beNil()); + expect(@(fileStatusEqualsExpected(precomposedFileEntry.path, GTStatusDeltaStatusRenamed, GTStatusDeltaStatusUntracked))).to(beTruthy()); }); }); @@ -277,4 +280,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTOIDSpec.m b/ObjectiveGitTests/GTOIDSpec.m index 6f1885539..3f301caa9 100644 --- a/ObjectiveGitTests/GTOIDSpec.m +++ b/ObjectiveGitTests/GTOIDSpec.m @@ -6,7 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -SpecBegin(GTOID) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTOIDSpec) NSString *testSHA = @"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"; @@ -15,26 +21,26 @@ beforeEach(^{ testOID = [[GTOID alloc] initWithSHA:testSHA]; - expect(testOID).notTo.beNil(); - expect(testOID.SHA).to.equal(testSHA); + expect(testOID).notTo(beNil()); + expect(testOID.SHA).to(equal(testSHA)); }); it(@"should expose the git_oid", ^{ - expect(testOID.git_oid).notTo.beNil(); - expect(testOID).to.equal([[GTOID alloc] initWithGitOid:testOID.git_oid]); + expect([NSValue valueWithPointer:testOID.git_oid]).notTo(equal([NSValue valueWithPointer:NULL])); + expect(testOID).to(equal([[GTOID alloc] initWithGitOid:testOID.git_oid])); }); it(@"should compare equal to an OID created with the same SHA", ^{ - expect(testOID).to.equal([[GTOID alloc] initWithSHA:testSHA]); + expect(testOID).to(equal([[GTOID alloc] initWithSHA:testSHA])); }); it(@"should compare unequal to a different OID", ^{ NSString *secondSHA = @"82dc47f6ba3beecab33080a1136d8913098e1801"; - expect(testOID).notTo.equal([[GTOID alloc] initWithSHA:secondSHA]); + expect(testOID).notTo(equal([[GTOID alloc] initWithSHA:secondSHA])); }); it(@"should compare equal to an OID created with the same SHA from a C string", ^{ - expect(testOID).to.equal([[GTOID alloc] initWithSHACString:"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"]); + expect(testOID).to(equal([[GTOID alloc] initWithSHACString:"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"])); }); }); @@ -47,35 +53,35 @@ } GTOID *testOID = [[GTOID alloc] initWithGitOid:git_oid]; - expect(testOID.SHA).to.equal(testSHA); + expect(testOID.SHA).to(equal(testSHA)); }); it(@"should return an error when initialized with an empty SHA string", ^{ NSError *error = nil; GTOID *oid = [[GTOID alloc] initWithSHA:@"" error:&error]; - expect(oid).to.beNil(); - expect(error).notTo.beNil(); + expect(oid).to(beNil()); + expect(error).notTo(beNil()); }); it(@"should return an error when initialized with a string that contains non-hex characters", ^{ NSError *error = nil; GTOID *oid = [[GTOID alloc] initWithSHA:@"zzzzz8f4404d3a388efbff6711f1bdf28ffd16a0" error:&error]; - expect(oid).to.beNil(); - expect(error).notTo.beNil(); + expect(oid).to(beNil()); + expect(error).notTo(beNil()); }); it(@"should return an error when initialized with a string shorter than 40 characters", ^{ NSError *error = nil; GTOID *oid = [[GTOID alloc] initWithSHA:@"f7ecd80" error:&error]; - expect(oid).to.beNil(); - expect(error).notTo.beNil(); + expect(oid).to(beNil()); + expect(error).notTo(beNil()); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTObjectDatabaseSpec.m b/ObjectiveGitTests/GTObjectDatabaseSpec.m index a5195a8c7..f68ed056f 100644 --- a/ObjectiveGitTests/GTObjectDatabaseSpec.m +++ b/ObjectiveGitTests/GTObjectDatabaseSpec.m @@ -6,18 +6,22 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTObjectDatabase.h" +#import +#import +#import -SpecBegin(GTObjectDatabase) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTObjectDatabaseSpec) __block GTObjectDatabase *database; beforeEach(^{ GTRepository *repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); + expect(repo).notTo(beNil()); database = [repo objectDatabaseWithError:NULL]; - expect(database).notTo.beNil(); + expect(database).notTo(beNil()); }); it(@"should know what objects exist", ^{ @@ -32,33 +36,33 @@ ]; for (NSString *SHA in existentSHAs) { - expect([database containsObjectWithSHA:SHA error:NULL]).to.beTruthy(); + expect(@([database containsObjectWithSHA:SHA error:NULL])).to(beTruthy()); } for (NSString *SHA in nonExistentSHAs) { - expect([database containsObjectWithSHA:SHA error:NULL]).to.beFalsy(); + expect(@([database containsObjectWithSHA:SHA error:NULL])).to(beFalsy()); } }); it(@"should be able to read an object", ^{ GTOdbObject *object = [database objectWithSHA:@"8496071c1b46c854b31185ea97743be6a8774479" error:NULL]; - expect(object).notTo.beNil(); - expect(object.type).to.equal(GTObjectTypeCommit); + expect(object).notTo(beNil()); + expect(@(object.type)).to(equal(@(GTObjectTypeCommit))); NSData *data = object.data; - expect(data).notTo.beNil(); - expect(data.length).to.equal(172); - + expect(data).notTo(beNil()); + expect(@(data.length)).to(equal(@172)); + NSString *stringContents = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - expect(stringContents).notTo.beNil(); + expect(stringContents).notTo(beNil()); NSString *header = [stringContents substringToIndex:45]; - expect(header).to.equal(@"tree 181037049a54a1eb5fab404658a3a250b44335d7"); + expect(header).to(equal(@"tree 181037049a54a1eb5fab404658a3a250b44335d7")); }); it(@"shouldn't be able to read a non-existent object", ^{ GTOdbObject *object = [database objectWithSHA:@"a496071c1b46c854b31185ea97743be6a8774471" error:NULL]; - expect(object).to.beNil(); + expect(object).to(beNil()); }); it(@"should be able to write", ^{ @@ -66,12 +70,12 @@ static const GTObjectType testContentType = GTObjectTypeBlob; static NSString * const testContentSHA = @"76b1b55ab653581d6f2c7230d34098e837197674"; GTOID *oid = [database writeData:[testContent dataUsingEncoding:NSUTF8StringEncoding] type:testContentType error:NULL]; - expect(oid.SHA).to.equal(testContentSHA); - expect([database containsObjectWithSHA:testContentSHA error:NULL]).to.beTruthy(); + expect(oid.SHA).to(equal(testContentSHA)); + expect(@([database containsObjectWithSHA:testContentSHA error:NULL])).to(beTruthy()); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTObjectTest.m b/ObjectiveGitTests/GTObjectSpec.m similarity index 84% rename from ObjectiveGitTests/GTObjectTest.m rename to ObjectiveGitTests/GTObjectSpec.m index 7768ccb57..c8e89ea0a 100644 --- a/ObjectiveGitTests/GTObjectTest.m +++ b/ObjectiveGitTests/GTObjectSpec.m @@ -27,71 +27,66 @@ // THE SOFTWARE. // -@interface GTObjectTest : GTTestCase { - - GTRepository *repo; -} -@end +#import +#import -@implementation GTObjectTest +#import "QuickSpec+GTFixtures.h" -- (void)setUp { - repo = self.bareFixtureRepository; -} +QuickSpecBegin(GTObjectSpec) -- (void)testCanLookupEmptyStringFails { - +__block GTRepository *repo; + +beforeEach(^{ + repo = self.bareFixtureRepository; +}); + +it(@"should fail to look up an empty string", ^{ NSError *error = nil; GTObject *obj = [repo lookUpObjectBySHA:@"" error:&error]; - + XCTAssertNotNil(error); XCTAssertNil(obj); NSLog(@"Error = %@", [error localizedDescription]); -} +}); -- (void)testCanLookupBadObjectFails { - +it(@"should fail to look up a bad object", ^{ NSError *error = nil; GTObject *obj = [repo lookUpObjectBySHA:@"a496071c1b46c854b31185ea97743be6a8774479" error:&error]; - + XCTAssertNotNil(error); XCTAssertNil(obj); NSLog(@"Error = %@", [error localizedDescription]); -} +}); -- (void)testCanLookupAnObject { - +it(@"should look up a valid object", ^{ NSError *error = nil; GTObject *obj = [repo lookUpObjectBySHA:@"8496071c1b46c854b31185ea97743be6a8774479" error:&error]; - + XCTAssertNil(error, "%@", error.localizedDescription); XCTAssertNotNil(obj); XCTAssertEqualObjects(obj.type, @"commit"); XCTAssertEqualObjects(obj.SHA, @"8496071c1b46c854b31185ea97743be6a8774479"); -} +}); -- (void)testTwoObjectsAreTheSame { - +it(@"should look up equivalent objects", ^{ NSError *error = nil; GTObject *obj1 = [repo lookUpObjectBySHA:@"8496071c1b46c854b31185ea97743be6a8774479" error:&error]; GTObject *obj2 = [repo lookUpObjectBySHA:@"8496071c1b46c854b31185ea97743be6a8774479" error:&error]; - + XCTAssertNotNil(obj1); XCTAssertNotNil(obj2); XCTAssertTrue([obj1 isEqual:obj2]); -} +}); -- (void)testCanReadRawDataFromObject { - +it(@"should read the raw data from an object", ^{ NSError *error = nil; GTObject *obj = [repo lookUpObjectBySHA:@"8496071c1b46c854b31185ea97743be6a8774479" error:&error]; - + XCTAssertNotNil(obj); - + GTOdbObject *rawObj = [obj odbObjectWithError:&error]; XCTAssertNotNil(rawObj); XCTAssertNil(error, @"%@", error.localizedDescription); - NSLog(@"rawObj len = %ld", [rawObj.data length]); -} +}); -@end +QuickSpecEnd diff --git a/ObjectiveGitTests/GTReferenceSpec.m b/ObjectiveGitTests/GTReferenceSpec.m index f3392c968..54bb2e687 100644 --- a/ObjectiveGitTests/GTReferenceSpec.m +++ b/ObjectiveGitTests/GTReferenceSpec.m @@ -6,42 +6,48 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -SpecBegin(GTReference) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTReferenceSpec) __block GTRepository *repository; beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); }); it(@"should compare equal to the same reference", ^{ - expect([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]).to.equal([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]); + expect([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]).to(equal([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL])); }); it(@"should compare unequal to a different reference", ^{ - expect([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]).notTo.equal([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/remotes/origin/master" inRepository:repository error:NULL]); + expect([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:NULL]).notTo(equal([[GTReference alloc] initByLookingUpReferenceNamed:@"refs/remotes/origin/master" inRepository:repository error:NULL])); }); describe(@"remote property", ^{ it(@"should be YES for a remote-tracking branch", ^{ NSError *error = nil; GTReference *ref = [[GTReference alloc] initByLookingUpReferenceNamed:@"refs/remotes/origin/master" inRepository:repository error:&error]; - expect(ref).notTo.beNil(); - expect(error).to.beNil(); + expect(ref).notTo(beNil()); + expect(error).to(beNil()); - expect(ref.OID.SHA).to.equal(@"d603d61ea756eb881ba440b3e66b561d070aec6e"); - expect(ref.remote).to.beTruthy(); + expect(ref.OID.SHA).to(equal(@"d603d61ea756eb881ba440b3e66b561d070aec6e")); + expect(@(ref.remote)).to(beTruthy()); }); it(@"should be NO for a local branch", ^{ NSError *error = nil; GTReference *ref = [[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:repository error:&error]; - expect(ref).notTo.beNil(); - expect(error).to.beNil(); + expect(ref).notTo(beNil()); + expect(error).to(beNil()); - expect(ref.OID.SHA).to.equal(@"a4bca6b67a5483169963572ee3da563da33712f7"); - expect(ref.remote).to.beFalsy(); + expect(ref.OID.SHA).to(equal(@"a4bca6b67a5483169963572ee3da563da33712f7")); + expect(@(ref.remote)).to(beFalsy()); }); }); @@ -53,69 +59,69 @@ beforeEach(^{ GTRepository *repository = self.bareFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); NSError *error; reference = [repository createReferenceNamed:testRefName fromOID:testRefOID committer:nil message:nil error:&error]; - expect(reference).notTo.beNil(); - expect(reference.name).to.equal(testRefName); - expect(reference.targetSHA).to.equal(testRefOID.SHA); + expect(reference).notTo(beNil()); + expect(reference.name).to(equal(testRefName)); + expect(reference.targetSHA).to(equal(testRefOID.SHA)); }); it(@"should be able to be renamed", ^{ NSString *newRefName = @"refs/heads/new_name"; GTReference *renamedRef = [reference referenceByRenaming:newRefName error:NULL]; - expect(renamedRef).notTo.beNil(); - expect(renamedRef.name).to.equal(newRefName); - expect(renamedRef.targetSHA).to.equal(testRefOID.SHA); + expect(renamedRef).notTo(beNil()); + expect(renamedRef.name).to(equal(newRefName)); + expect(renamedRef.targetSHA).to(equal(testRefOID.SHA)); }); it(@"should be able to change the target", ^{ NSString *newRefTarget = @"5b5b025afb0b4c913b4c338a42934a3863bf3644"; GTReference *updatedRef = [reference referenceByUpdatingTarget:newRefTarget committer:nil message:nil error:NULL]; - expect(updatedRef).notTo.beNil(); - expect(updatedRef.name).to.equal(testRefName); - expect(updatedRef.targetSHA).to.equal(newRefTarget); + expect(updatedRef).notTo(beNil()); + expect(updatedRef.name).to(equal(testRefName)); + expect(updatedRef.targetSHA).to(equal(newRefTarget)); }); }); describe(@"valid names",^{ it(@"should accept uppercase top-level names", ^{ - expect([GTReference isValidReferenceName:@"HEAD"]).to.beTruthy(); - expect([GTReference isValidReferenceName:@"ORIG_HEAD"]).to.beTruthy(); + expect(@([GTReference isValidReferenceName:@"HEAD"])).to(beTruthy()); + expect(@([GTReference isValidReferenceName:@"ORIG_HEAD"])).to(beTruthy()); }); it(@"should not accept lowercase top-level names",^{ - expect([GTReference isValidReferenceName:@"head"]).notTo.beTruthy(); + expect(@([GTReference isValidReferenceName:@"head"])).notTo(beTruthy()); }); it(@"should accept names with the refs/ prefix",^{ - expect([GTReference isValidReferenceName:@"refs/stuff"]).to.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/multiple/components"]).to.beTruthy(); + expect(@([GTReference isValidReferenceName:@"refs/stuff"])).to(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/multiple/components"])).to(beTruthy()); }); it(@"should not accept names with invalid parts",^{ - expect([GTReference isValidReferenceName:@"refs/stuff~"]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff^"]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff:"]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff\\"]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff?"]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff["]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff*"]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff.."]).notTo.beTruthy(); - expect([GTReference isValidReferenceName:@"refs/stuff@{"]).notTo.beTruthy(); + expect(@([GTReference isValidReferenceName:@"refs/stuff~"])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff^"])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff:"])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff\\"])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff?"])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff["])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff*"])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff.."])).notTo(beTruthy()); + expect(@([GTReference isValidReferenceName:@"refs/stuff@{"])).notTo(beTruthy()); }); }); __block GTRepository *bareRepository; void (^expectValidReference)(GTReference *ref, NSString *SHA, GTReferenceType type, NSString *name) = ^(GTReference *ref, NSString *SHA, GTReferenceType type, NSString *name) { - expect(ref).notTo.beNil(); - expect(ref.targetSHA).to.equal(SHA); - expect(ref.referenceType).to.equal(type); - expect(ref.name).to.equal(name); + expect(ref).notTo(beNil()); + expect(ref.targetSHA).to(equal(SHA)); + expect(@(ref.referenceType)).to(equal(@(type))); + expect(ref.name).to(equal(name)); }; beforeEach(^{ @@ -126,8 +132,8 @@ it(@"should return a valid reference to a branch", ^{ NSError *error = nil; GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/heads/master" inRepository:bareRepository error:&error]; - expect(ref).notTo.beNil(); - expect(error).to.beNil(); + expect(ref).notTo(beNil()); + expect(error).to(beNil()); expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeOid, @"refs/heads/master"); }); @@ -135,8 +141,8 @@ it(@"should return a valid reference to a tag", ^{ NSError *error = nil; GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/tags/v0.9" inRepository:bareRepository error:&error]; - expect(ref).notTo.beNil(); - expect(error).to.beNil(); + expect(ref).notTo(beNil()); + expect(error).to(beNil()); expectValidReference(ref, @"5b5b025afb0b4c913b4c338a42934a3863bf3644", GTReferenceTypeOid, @"refs/tags/v0.9"); }); @@ -145,15 +151,15 @@ describe(@"creating", ^{ it(@"can create a reference from a symbolic reference", ^{ GTReference *target = [[GTReference alloc] initByLookingUpReferenceNamed:@"refs/heads/master" inRepository:bareRepository error:NULL]; - expect(target).notTo.beNil(); + expect(target).notTo(beNil()); NSError *error = nil; GTReference *ref = [bareRepository createReferenceNamed:@"refs/heads/unit_test" fromReference:target committer:nil message:nil error:&error]; - expect(error).to.beNil(); - expect(ref).notTo.beNil(); + expect(error).to(beNil()); + expect(ref).notTo(beNil()); expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeSymbolic, @"refs/heads/unit_test"); - expect(ref.resolvedReference.name).to.equal(@"refs/heads/master"); + expect(ref.resolvedReference.name).to(equal(@"refs/heads/master")); }); it(@"can create a reference from an SHA/OID", ^{ @@ -161,8 +167,8 @@ NSError *error = nil; GTReference *ref = [bareRepository createReferenceNamed:@"refs/heads/unit_test" fromOID:target committer:nil message:nil error:&error]; - expect(error).to.beNil(); - expect(ref).notTo.beNil(); + expect(error).to(beNil()); + expect(ref).notTo(beNil()); expectValidReference(ref, @"36060c58702ed4c2a40832c51758d5344201d89a", GTReferenceTypeOid, @"refs/heads/unit_test"); }); @@ -175,12 +181,12 @@ NSError *error = nil; GTReference *ref = [bareRepository createReferenceNamed:@"refs/heads/unit_test" fromOID:target committer:nil message:nil error:&error]; - expect(error).to.beNil(); - expect(ref).notTo.beNil(); + expect(error).to(beNil()); + expect(ref).notTo(beNil()); BOOL success = [ref deleteWithError:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); }); @@ -188,4 +194,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTReflogSpec.m b/ObjectiveGitTests/GTReflogSpec.m index 378fa7712..dbd484f1f 100644 --- a/ObjectiveGitTests/GTReflogSpec.m +++ b/ObjectiveGitTests/GTReflogSpec.m @@ -6,32 +6,36 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTReflog.h" +#import +#import +#import -SpecBegin(GTReflog) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTReflogSpec) __block GTReflog *reflog; __block GTRepository *repository; beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); GTBranch *branch = [repository currentBranchWithError:NULL]; - expect(branch).notTo.beNil(); - + expect(branch).notTo(beNil()); + reflog = branch.reference.reflog; - expect(reflog).notTo.beNil(); + expect(reflog).notTo(beNil()); }); describe(@"reading", ^{ it(@"should be able to read reflog entries", ^{ GTReflogEntry *entry = [reflog entryAtIndex:0]; - expect(entry).notTo.beNil(); - expect(entry.message).to.equal(@"commit: Add 2 text and 1 binary file for diff tests."); - expect(entry.previousOID).to.equal([[GTOID alloc] initWithSHA:@"6b0c1c8b8816416089c534e474f4c692a76ac14f"]); - expect(entry.updatedOID).to.equal([[GTOID alloc] initWithSHA:@"a4bca6b67a5483169963572ee3da563da33712f7"]); - expect(entry.committer.name).to.equal(@"Danny Greg"); - expect(entry.committer.email).to.equal(@"danny@github.com"); + expect(entry).notTo(beNil()); + expect(entry.message).to(equal(@"commit: Add 2 text and 1 binary file for diff tests.")); + expect(entry.previousOID).to(equal([[GTOID alloc] initWithSHA:@"6b0c1c8b8816416089c534e474f4c692a76ac14f"])); + expect(entry.updatedOID).to(equal([[GTOID alloc] initWithSHA:@"a4bca6b67a5483169963572ee3da563da33712f7"])); + expect(entry.committer.name).to(equal(@"Danny Greg")); + expect(entry.committer.email).to(equal(@"danny@github.com")); }); }); @@ -40,15 +44,15 @@ static NSString * const message = @"Refloggin' ain't easy."; GTSignature *user = repository.userSignatureForNow; BOOL success = [reflog writeEntryWithCommitter:user message:message error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); GTReflogEntry *entry = [reflog entryAtIndex:0]; - expect(entry).notTo.beNil(); - expect(entry.message).to.equal(message); - expect(entry.previousOID).to.equal([[GTOID alloc] initWithSHA:@"a4bca6b67a5483169963572ee3da563da33712f7"]); - expect(entry.updatedOID).to.equal([[GTOID alloc] initWithSHA:@"a4bca6b67a5483169963572ee3da563da33712f7"]); - expect(entry.committer.name).to.equal(user.name); - expect(entry.committer.email).to.equal(user.email); + expect(entry).notTo(beNil()); + expect(entry.message).to(equal(message)); + expect(entry.previousOID).to(equal([[GTOID alloc] initWithSHA:@"a4bca6b67a5483169963572ee3da563da33712f7"])); + expect(entry.updatedOID).to(equal([[GTOID alloc] initWithSHA:@"a4bca6b67a5483169963572ee3da563da33712f7"])); + expect(entry.committer.name).to(equal(user.name)); + expect(entry.committer.email).to(equal(user.email)); }); }); @@ -56,4 +60,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRemoteSpec.m b/ObjectiveGitTests/GTRemoteSpec.m index 8e271a004..02c1ce432 100644 --- a/ObjectiveGitTests/GTRemoteSpec.m +++ b/ObjectiveGitTests/GTRemoteSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTRemote.h" +#import +#import +#import -SpecBegin(GTRemote) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRemoteSpec) __block GTRemote *remote = nil; __block GTRepository *repository = nil; @@ -16,52 +20,52 @@ beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); NSError *error = nil; GTConfiguration *configuration = [repository configurationWithError:&error]; - expect(configuration).toNot.beNil(); - expect(error).to.beNil(); + expect(configuration).notTo(beNil()); + expect(error).to(beNil()); - expect(configuration.remotes.count).to.beGreaterThanOrEqualTo(1); + expect(@(configuration.remotes.count)).to(beGreaterThanOrEqualTo(@1)); remote = configuration.remotes[0]; - expect(remote.name).to.equal(@"origin"); + expect(remote.name).to(equal(@"origin")); }); describe(@"properties", ^{ it(@"should have values", ^{ - expect(remote.git_remote).toNot.beNil(); - expect(remote.name).to.equal(@"origin"); - expect(remote.URLString).to.equal(@"git@github.com:github/Test_App.git"); + expect([NSValue valueWithPointer:remote.git_remote]).notTo(equal([NSValue valueWithPointer:NULL])); + expect(remote.name).to(equal(@"origin")); + expect(remote.URLString).to(equal(@"git@github.com:github/Test_App.git")); - expect(remote.fetchRefspecs).to.equal(@[ fetchRefspec ]); + expect(remote.fetchRefspecs).to(equal(@[ fetchRefspec ])); }); }); describe(@"updating", ^{ it(@"URL string", ^{ - expect(remote.URLString).to.equal(@"git@github.com:github/Test_App.git"); + expect(remote.URLString).to(equal(@"git@github.com:github/Test_App.git")); NSString *newURLString = @"https://github.com/github/Test_App.git"; __block NSError *error = nil; - expect([remote updateURLString:newURLString error:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([remote updateURLString:newURLString error:&error])).to(beTruthy()); + expect(error).to(beNil()); - expect(remote.URLString).to.equal(newURLString); + expect(remote.URLString).to(equal(newURLString)); }); it(@"fetch refspecs", ^{ - expect(remote.fetchRefspecs).to.equal(@[ fetchRefspec ]); + expect(remote.fetchRefspecs).to(equal(@[ fetchRefspec ])); NSString *newFetchRefspec = @"+refs/heads/master:refs/remotes/origin/master"; __block NSError *error = nil; - expect([remote addFetchRefspec:newFetchRefspec error:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([remote addFetchRefspec:newFetchRefspec error:&error])).to(beTruthy()); + expect(error).to(beNil()); - expect(remote.fetchRefspecs).to.equal((@[ fetchRefspec, newFetchRefspec ])); + expect(remote.fetchRefspecs).to(equal((@[ fetchRefspec, newFetchRefspec ]))); }); }); @@ -74,19 +78,19 @@ beforeEach(^{ repository = self.bareFixtureRepository; - expect(repository.isBare).to.beFalsy(); // yeah right + expect(@(repository.isBare)).to(beFalsy()); // yeah right repositoryURL = repository.gitDirectoryURL; NSURL *fixturesURL = repositoryURL.URLByDeletingLastPathComponent; fetchingRepoURL = [fixturesURL URLByAppendingPathComponent:@"fetchrepo"]; NSError *error = nil; fetchingRepo = [GTRepository cloneFromURL:repositoryURL toWorkingDirectory:fetchingRepoURL options:nil error:&error transferProgressBlock:nil checkoutProgressBlock:nil]; - expect(fetchingRepo).notTo.beNil(); - expect(error).to.beNil(); + expect(fetchingRepo).notTo(beNil()); + expect(error).to(beNil()); remoteNames = [fetchingRepo remoteNamesWithError:&error]; - expect(error).to.beNil(); - expect(remoteNames.count).to.beGreaterThanOrEqualTo(1); + expect(error).to(beNil()); + expect(@(remoteNames.count)).to(beGreaterThanOrEqualTo(@1)); remoteName = remoteNames[0]; }); @@ -100,18 +104,18 @@ NSError *error = nil; GTRemote *originRemote = [GTRemote remoteWithName:remoteName inRepository:fetchingRepo error:&error]; - expect(error).to.beNil(); - expect(originRemote).notTo.beNil(); - expect(originRemote.name).to.equal(@"origin"); - expect(originRemote.URLString).to.equal(repositoryURL.path); + expect(error).to(beNil()); + expect(originRemote).notTo(beNil()); + expect(originRemote.name).to(equal(@"origin")); + expect(originRemote.URLString).to(equal(repositoryURL.path)); }); it(@"should fail for non-existent remotes", ^{ NSError *error = nil; GTRemote *originRemote = [GTRemote remoteWithName:@"blork" inRepository:fetchingRepo error:&error]; - expect(error).notTo.beNil(); - expect(originRemote).to.beNil(); + expect(error).notTo(beNil()); + expect(originRemote).to(beNil()); }); }); @@ -119,13 +123,13 @@ it(@"should allow creating new remotes", ^{ NSError *error = nil; GTRemote *remote = [GTRemote createRemoteWithName:@"newremote" URLString:@"git://user@example.com/testrepo.git" inRepository:fetchingRepo error:&error]; - expect(error).to.beNil(); - expect(remote).notTo.beNil(); + expect(error).to(beNil()); + expect(remote).notTo(beNil()); GTRemote *newRemote = [GTRemote remoteWithName:@"newremote" inRepository:fetchingRepo error:&error]; - expect(error).to.beNil(); - expect(newRemote).notTo.beNil(); - expect(newRemote.URLString).to.equal(@"git://user@example.com/testrepo.git"); + expect(error).to(beNil()); + expect(newRemote).notTo(beNil()); + expect(newRemote.URLString).to(equal(@"git://user@example.com/testrepo.git")); }); }); @@ -144,7 +148,7 @@ GTCommit *parent = [commitEnum nextObject]; GTCommit *testCommit = [repo createCommitWithTree:testTree message:message parents:@[parent] updatingReferenceNamed:headReference.name error:nil]; - expect(testCommit).notTo.beNil(); + expect(testCommit).notTo(beNil()); return testCommit; }; @@ -155,8 +159,8 @@ GTRemote *remote = [GTRemote remoteWithName:remoteName inRepository:fetchingRepo error:nil]; // Tested above BOOL result = [fetchingRepo fetchRemote:remote withOptions:nil error:&error progress:nil]; - expect(error).to.beNil(); - expect(result).to.beTruthy(); + expect(error).to(beNil()); + expect(@(result)).to(beTruthy()); }); it(@"brings in new commits", ^{ @@ -177,24 +181,24 @@ receivedObjects += stats->received_objects; transferProgressed = YES; }]; - expect(error).to.beNil(); - expect(success).to.beTruthy(); - expect(transferProgressed).to.beTruthy(); - expect(receivedObjects).to.equal(10); + expect(error).to(beNil()); + expect(@(success)).to(beTruthy()); + expect(@(transferProgressed)).to(beTruthy()); + expect(@(receivedObjects)).to(equal(@10)); GTCommit *fetchedCommit = [fetchingRepo lookUpObjectByOID:testCommit.OID objectType:GTObjectTypeCommit error:&error]; - expect(error).to.beNil(); - expect(fetchedCommit).notTo.beNil(); + expect(error).to(beNil()); + expect(fetchedCommit).notTo(beNil()); GTTreeEntry *entry = [[fetchedCommit tree] entryWithName:fileName]; - expect(entry).notTo.beNil(); + expect(entry).notTo(beNil()); GTBlob *fileData = (GTBlob *)[entry GTObject:&error]; - expect(error).to.beNil(); - expect(fileData).notTo.beNil(); - expect(fileData.content).to.equal(testData); + expect(error).to(beNil()); + expect(fileData).notTo(beNil()); + expect(fileData.content).to(equal(testData)); }); }); }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRepository+StatusSpec.m b/ObjectiveGitTests/GTRepository+StatusSpec.m index e7a0dbda4..de7a95312 100644 --- a/ObjectiveGitTests/GTRepository+StatusSpec.m +++ b/ObjectiveGitTests/GTRepository+StatusSpec.m @@ -6,7 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -SpecBegin(GTRepositoryStatus) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRepositoryStatus) describe(@"Checking status", ^{ __block GTRepository *repository = nil; @@ -14,90 +20,90 @@ __block NSError *err; NSData *testData = [@"test" dataUsingEncoding:NSUTF8StringEncoding]; - + beforeEach(^{ repository = self.testAppFixtureRepository; targetFileURL = [repository.fileURL URLByAppendingPathComponent:@"main.m"]; - expect(repository).toNot.beNil(); + expect(repository).notTo(beNil()); }); - + void (^updateIndexForSubpathAndExpectStatus)(NSString *, GTStatusDeltaStatus) = ^(NSString *subpath, GTStatusDeltaStatus expectedIndexStatus) { __block NSError *err = nil; GTIndex *index = [repository indexWithError:&err]; - expect(err).to.beNil(); - expect(index).toNot.beNil(); - expect([index updatePathspecs:NULL error:NULL passingTest:NULL]).to.beTruthy(); + expect(err).to(beNil()); + expect(index).notTo(beNil()); + expect(@([index updatePathspecs:NULL error:NULL passingTest:NULL])).to(beTruthy()); NSDictionary *renamedOptions = @{ GTRepositoryStatusOptionsFlagsKey: @(GTRepositoryStatusFlagsIncludeIgnored | GTRepositoryStatusFlagsIncludeUntracked | GTRepositoryStatusFlagsRecurseUntrackedDirectories | GTRepositoryStatusFlagsRenamesHeadToIndex) }; - expect([repository enumerateFileStatusWithOptions:renamedOptions error:&err usingBlock:^(GTStatusDelta *headToIndex, GTStatusDelta *indexToWorkingDirectory, BOOL *stop) { + expect(@([repository enumerateFileStatusWithOptions:renamedOptions error:&err usingBlock:^(GTStatusDelta *headToIndex, GTStatusDelta *indexToWorkingDirectory, BOOL *stop) { if (![headToIndex.newFile.path isEqualToString:subpath]) return; - expect(headToIndex.status).to.equal(expectedIndexStatus); - }]).to.beTruthy(); - expect(err).to.beNil(); + expect(@(headToIndex.status)).to(equal(@(expectedIndexStatus))); + }])).to(beTruthy()); + expect(err).to(beNil()); }; - + void (^expectSubpathToHaveWorkDirStatus)(NSString *, GTStatusDeltaStatus) = ^(NSString *subpath, GTStatusDeltaStatus expectedWorkDirStatus) { __block NSError *err = nil; NSDictionary *renamedOptions = @{ GTRepositoryStatusOptionsFlagsKey: @(GTRepositoryStatusFlagsIncludeIgnored | GTRepositoryStatusFlagsIncludeUntracked | GTRepositoryStatusFlagsRecurseUntrackedDirectories | GTRepositoryStatusFlagsRenamesIndexToWorkingDirectory) }; - expect([repository enumerateFileStatusWithOptions:renamedOptions error:&err usingBlock:^(GTStatusDelta *headToIndex, GTStatusDelta *indexToWorkingDirectory, BOOL *stop) { + expect(@([repository enumerateFileStatusWithOptions:renamedOptions error:&err usingBlock:^(GTStatusDelta *headToIndex, GTStatusDelta *indexToWorkingDirectory, BOOL *stop) { if (![indexToWorkingDirectory.newFile.path isEqualToString:subpath]) return; - expect(indexToWorkingDirectory.status).to.equal(expectedWorkDirStatus); - }]).to.beTruthy(); - expect(err).to.beNil(); + expect(@(indexToWorkingDirectory.status)).to(equal(@(expectedWorkDirStatus))); + }])).to(beTruthy()); + expect(err).to(beNil()); }; - + void (^expectSubpathToHaveMatchingStatus)(NSString *, GTStatusDeltaStatus) = ^(NSString *subpath, GTStatusDeltaStatus status) { expectSubpathToHaveWorkDirStatus(subpath, status); updateIndexForSubpathAndExpectStatus(subpath, status); }; - + it(@"should recognize untracked files", ^{ expectSubpathToHaveWorkDirStatus(@"UntrackedImage.png", GTStatusDeltaStatusUntracked); }); - + it(@"should recognize added files", ^{ updateIndexForSubpathAndExpectStatus(@"UntrackedImage.png", GTStatusDeltaStatusAdded); }); - + it(@"should recognize modified files", ^{ - expect([NSFileManager.defaultManager removeItemAtURL:targetFileURL error:&err]).to.beTruthy(); - expect(err).to.beNil(); - expect([testData writeToURL:targetFileURL atomically:YES]).to.beTruthy(); + expect(@([NSFileManager.defaultManager removeItemAtURL:targetFileURL error:&err])).to(beTruthy()); + expect(err).to(beNil()); + expect(@([testData writeToURL:targetFileURL atomically:YES])).to(beTruthy()); expectSubpathToHaveMatchingStatus(targetFileURL.lastPathComponent, GTStatusDeltaStatusModified); }); - + it(@"should recognize copied files", ^{ NSURL *copyLocation = [repository.fileURL URLByAppendingPathComponent:@"main2.m"]; - expect([NSFileManager.defaultManager copyItemAtURL:targetFileURL toURL:copyLocation error:&err]).to.beTruthy(); - expect(err).to.beNil(); + expect(@([NSFileManager.defaultManager copyItemAtURL:targetFileURL toURL:copyLocation error:&err])).to(beTruthy()); + expect(err).to(beNil()); updateIndexForSubpathAndExpectStatus(copyLocation.lastPathComponent, GTStatusDeltaStatusCopied); }); - + it(@"should recognize deleted files", ^{ - expect([NSFileManager.defaultManager removeItemAtURL:targetFileURL error:&err]).to.beTruthy(); - expect(err).to.beNil(); + expect(@([NSFileManager.defaultManager removeItemAtURL:targetFileURL error:&err])).to(beTruthy()); + expect(err).to(beNil()); expectSubpathToHaveMatchingStatus(targetFileURL.lastPathComponent, GTStatusDeltaStatusDeleted); }); - + it(@"should recognize renamed files", ^{ NSURL *moveLocation = [repository.fileURL URLByAppendingPathComponent:@"main-moved.m"]; - expect([NSFileManager.defaultManager moveItemAtURL:targetFileURL toURL:moveLocation error:&err]).to.beTruthy(); - expect(err).to.beNil(); + expect(@([NSFileManager.defaultManager moveItemAtURL:targetFileURL toURL:moveLocation error:&err])).to(beTruthy()); + expect(err).to(beNil()); expectSubpathToHaveWorkDirStatus(moveLocation.lastPathComponent, GTStatusDeltaStatusRenamed); }); - + it(@"should recognise ignored files", ^{ //at least in the default options expectSubpathToHaveWorkDirStatus(@".DS_Store", GTStatusDeltaStatusIgnored); }); - + it(@"should skip ignored files if asked", ^{ __block NSError *err = nil; NSDictionary *options = @{ GTRepositoryStatusOptionsFlagsKey: @(0) }; BOOL enumerationSuccessful = [repository enumerateFileStatusWithOptions:options error:&err usingBlock:^(GTStatusDelta *headToIndex, GTStatusDelta *indexToWorkingDirectory, BOOL *stop) { - expect(indexToWorkingDirectory.status).toNot.equal(GTStatusDeltaStatusIgnored); + expect(@(indexToWorkingDirectory.status)).notTo(equal(@(GTStatusDeltaStatusIgnored))); }]; - expect(enumerationSuccessful).to.beTruthy(); - expect(err).to.beNil(); + expect(@(enumerationSuccessful)).to(beTruthy()); + expect(err).to(beNil()); }); }); @@ -105,4 +111,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRepositoryAttributesSpec.m b/ObjectiveGitTests/GTRepositoryAttributesSpec.m index dc4539e35..5e4ed7465 100644 --- a/ObjectiveGitTests/GTRepositoryAttributesSpec.m +++ b/ObjectiveGitTests/GTRepositoryAttributesSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import "GTRepository+Attributes.h" +#import +#import +#import -SpecBegin(GTRepositoryAttributes) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRepositoryAttributes) __block GTRepository *repository; @@ -20,16 +24,16 @@ static NSString * const testAttributes = @"*.txt filter=reverse"; NSURL *attributesURL = [repository.fileURL URLByAppendingPathComponent:@".gitattributes"]; BOOL success = [testAttributes writeToURL:attributesURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); NSString *value = [repository attributeWithName:@"filter" path:@"*.txt"]; - expect(value).to.equal(@"reverse"); + expect(value).to(equal(@"reverse")); value = [repository attributeWithName:@"filter" path:@"thing.txt"]; - expect(value).to.equal(@"reverse"); + expect(value).to(equal(@"reverse")); value = [repository attributeWithName:@"filter" path:@"thing.jpg"]; - expect(value).to.beNil(); + expect(value).to(beNil()); }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRepositoryCommittingSpec.m b/ObjectiveGitTests/GTRepositoryCommittingSpec.m index 375a923cf..ec0494dab 100644 --- a/ObjectiveGitTests/GTRepositoryCommittingSpec.m +++ b/ObjectiveGitTests/GTRepositoryCommittingSpec.m @@ -6,10 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTRepository.h" -#import "GTRepository+Committing.h" +#import +#import +#import -SpecBegin(GTRepositoryCommitting) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRepositoryCommitting) __block GTRepository *repository; @@ -20,40 +23,40 @@ NSURL *fileURL = [self.tempDirectoryFileURL URLByAppendingPathComponent:UUID isDirectory:NO]; repository = [GTRepository initializeEmptyRepositoryAtFileURL:fileURL error:NULL]; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); }); it(@"can create commits", ^{ GTTreeBuilder *builder = [[GTTreeBuilder alloc] initWithTree:nil error:NULL]; - expect(builder).toNot.beNil(); + expect(builder).notTo(beNil()); GTTreeEntry *entry = [builder addEntryWithData:[@"Another file contents" dataUsingEncoding:NSUTF8StringEncoding] fileName:@"Test file 2.txt" fileMode:GTFileModeBlob error:NULL]; - expect(entry).notTo.beNil(); + expect(entry).notTo(beNil()); GTTree *subtree = [builder writeTreeToRepository:repository error:NULL]; - expect(subtree).notTo.beNil(); + expect(subtree).notTo(beNil()); [builder clear]; entry = [builder addEntryWithData:[@"Test contents" dataUsingEncoding:NSUTF8StringEncoding] fileName:@"Test file.txt" fileMode:GTFileModeBlob error:NULL]; - expect(entry).notTo.beNil(); + expect(entry).notTo(beNil()); entry = [builder addEntryWithOID:subtree.OID fileName:@"subdir" fileMode:GTFileModeTree error:NULL]; - expect(entry).notTo.beNil(); + expect(entry).notTo(beNil()); GTTree *tree = [builder writeTreeToRepository:repository error:NULL]; - expect(tree).notTo.beNil(); + expect(tree).notTo(beNil()); GTCommit *initialCommit = [repository createCommitWithTree:tree message:@"Initial commit" parents:nil updatingReferenceNamed:@"refs/heads/master" error:NULL]; - expect(initialCommit).notTo.beNil(); + expect(initialCommit).notTo(beNil()); GTReference *ref = [repository headReferenceWithError:NULL]; - expect(ref).notTo.beNil(); - expect(ref.resolvedTarget).to.equal(initialCommit); + expect(ref).notTo(beNil()); + expect(ref.resolvedTarget).to(equal(initialCommit)); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRepositoryResetSpec.m b/ObjectiveGitTests/GTRepositoryResetSpec.m index 220d2c199..976437b28 100644 --- a/ObjectiveGitTests/GTRepositoryResetSpec.m +++ b/ObjectiveGitTests/GTRepositoryResetSpec.m @@ -6,11 +6,13 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import "GTRepository+Reset.h" -#import "GTRepository.h" -#import "GTIndex.h" +#import +#import +#import -SpecBegin(GTRepositoryReset) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRepositoryReset) __block GTRepository *repository; @@ -34,23 +36,23 @@ static NSString * const fileName = @"README.md"; NSURL *fileURL = [repository.fileURL URLByAppendingPathComponent:fileName]; BOOL success = [@"blahahaha" writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); GTIndex *index = [repository indexWithError:NULL]; - expect(index).notTo.beNil(); + expect(index).notTo(beNil()); success = [index addFile:fileName error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); - expect(countStagedFiles()).to.equal(1); + expect(@(countStagedFiles())).to(equal(@1)); GTCommit *HEAD = [repository lookUpObjectByRevParse:@"HEAD" error:NULL]; - expect(HEAD).notTo.beNil(); + expect(HEAD).notTo(beNil()); success = [repository resetPathspecs:@[ fileName ] toCommit:HEAD error:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); - expect(countStagedFiles()).to.equal(0); + expect(@(countStagedFiles())).to(equal(@0)); }); }); @@ -65,24 +67,24 @@ NSString *resetTargetSHA = @"8496071c1b46c854b31185ea97743be6a8774479"; GTCommit *commit = [repository lookUpObjectBySHA:resetTargetSHA error:NULL]; - expect(commit).notTo.beNil(); + expect(commit).notTo(beNil()); GTCommit *originalHeadCommit = [repository lookUpObjectBySHA:originalHead.targetSHA error:NULL]; - expect(originalHeadCommit).notTo.beNil(); + expect(originalHeadCommit).notTo(beNil()); BOOL success = [repository resetToCommit:commit resetType:GTRepositoryResetTypeSoft error:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); GTReference *head = [repository headReferenceWithError:&error]; - expect(head).notTo.beNil(); - expect(head.targetSHA).to.equal(resetTargetSHA); + expect(head).notTo(beNil()); + expect(head.targetSHA).to(equal(resetTargetSHA)); success = [repository resetToCommit:originalHeadCommit resetType:GTRepositoryResetTypeSoft error:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); head = [repository headReferenceWithError:&error]; - expect(head.targetSHA).to.equal(originalHead.targetSHA); + expect(head.targetSHA).to(equal(originalHead.targetSHA)); }); }); @@ -90,4 +92,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRepositorySpec.m b/ObjectiveGitTests/GTRepositorySpec.m index c5cffcacf..083725129 100644 --- a/ObjectiveGitTests/GTRepositorySpec.m +++ b/ObjectiveGitTests/GTRepositorySpec.m @@ -6,17 +6,19 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTRepository.h" -#import "GTRepository+Committing.h" -#import "SPTExample.h" +#import +#import +#import -SpecBegin(GTRepository) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRepositorySpec) __block GTRepository *repository; beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); }); describe(@"+initializeEmptyRepositoryAtFileURL:bare:error:", ^{ @@ -24,19 +26,18 @@ NSURL *newRepoURL = [self.tempDirectoryFileURL URLByAppendingPathComponent:@"init-repo"]; GTRepository *repository = [GTRepository initializeEmptyRepositoryAtFileURL:newRepoURL bare:NO error:NULL]; - expect(repository).notTo.beNil(); - expect(repository.gitDirectoryURL).notTo.beNil(); - expect(repository.bare).to.beFalsy(); + expect(repository).notTo(beNil()); + expect(repository.gitDirectoryURL).notTo(beNil()); + expect(@(repository.bare)).to(beFalsy()); }); it(@"should initialize a bare repository", ^{ NSURL *newRepoURL = [self.tempDirectoryFileURL URLByAppendingPathComponent:@"init-repo.git"]; GTRepository *repository = [GTRepository initializeEmptyRepositoryAtFileURL:newRepoURL bare:YES error:NULL]; - expect(repository).notTo.beNil(); - expect(repository.gitDirectoryURL).notTo.beNil(); - return repository; - expect(repository.bare).to.beTruthy(); + expect(repository).notTo(beNil()); + expect(repository.gitDirectoryURL).notTo(beNil()); + expect(@(repository.bare)).to(beTruthy()); }); }); @@ -44,10 +45,10 @@ it(@"should fail to initialize non-existent repos", ^{ NSError *error = nil; GTRepository *badRepo = [GTRepository repositoryWithURL:[NSURL fileURLWithPath:@"fake/1235"] error:&error]; - expect(badRepo).to.beNil(); - expect(error).notTo.beNil(); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_ENOTFOUND); + expect(badRepo).to(beNil()); + expect(error).notTo(beNil()); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_ENOTFOUND))); }); }); @@ -82,47 +83,47 @@ it(@"should handle normal clones", ^{ NSError *error = nil; repository = [GTRepository cloneFromURL:originURL toWorkingDirectory:workdirURL options:@{ GTRepositoryCloneOptionsCloneLocal: @YES } error:&error transferProgressBlock:transferProgressBlock checkoutProgressBlock:checkoutProgressBlock]; - expect(repository).notTo.beNil(); - expect(error).to.beNil(); - expect(transferProgressCalled).to.beTruthy(); - expect(checkoutProgressCalled).to.beTruthy(); + expect(repository).notTo(beNil()); + expect(error).to(beNil()); + expect(@(transferProgressCalled)).to(beTruthy()); + expect(@(checkoutProgressCalled)).to(beTruthy()); - expect(repository.isBare).to.beFalsy(); + expect(@(repository.isBare)).to(beFalsy()); GTReference *head = [repository headReferenceWithError:&error]; - expect(head).notTo.beNil(); - expect(error).to.beNil(); - expect(head.targetSHA).to.equal(@"36060c58702ed4c2a40832c51758d5344201d89a"); - expect(head.referenceType).to.equal(GTReferenceTypeOid); + expect(head).notTo(beNil()); + expect(error).to(beNil()); + expect(head.targetSHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a")); + expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid))); }); it(@"should handle bare clones", ^{ NSError *error = nil; NSDictionary *options = @{ GTRepositoryCloneOptionsBare: @YES, GTRepositoryCloneOptionsCloneLocal: @YES }; repository = [GTRepository cloneFromURL:originURL toWorkingDirectory:workdirURL options:options error:&error transferProgressBlock:transferProgressBlock checkoutProgressBlock:checkoutProgressBlock]; - expect(repository).notTo.beNil(); - expect(error).to.beNil(); - expect(transferProgressCalled).to.beTruthy(); - expect(checkoutProgressCalled).to.beFalsy(); + expect(repository).notTo(beNil()); + expect(error).to(beNil()); + expect(@(transferProgressCalled)).to(beTruthy()); + expect(@(checkoutProgressCalled)).to(beFalsy()); - expect(repository.isBare).to.beTruthy(); + expect(@(repository.isBare)).to(beTruthy()); GTReference *head = [repository headReferenceWithError:&error]; - expect(head).notTo.beNil(); - expect(error).to.beNil(); - expect(head.targetSHA).to.equal(@"36060c58702ed4c2a40832c51758d5344201d89a"); - expect(head.referenceType).to.equal(GTReferenceTypeOid); + expect(head).notTo(beNil()); + expect(error).to(beNil()); + expect(head.targetSHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a")); + expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid))); }); it(@"should have set a valid remote URL", ^{ NSError *error = nil; repository = [GTRepository cloneFromURL:originURL toWorkingDirectory:workdirURL options:nil error:&error transferProgressBlock:transferProgressBlock checkoutProgressBlock:checkoutProgressBlock]; - expect(repository).notTo.beNil(); - expect(error).to.beNil(); + expect(repository).notTo(beNil()); + expect(error).to(beNil()); GTRemote *originRemote = [GTRemote remoteWithName:@"origin" inRepository:repository error:&error]; - expect(error).to.beNil(); - expect(originRemote.URLString).to.equal(originURL.path); + expect(error).to(beNil()); + expect(originRemote.URLString).to(equal(originURL.path)); }); }); @@ -138,32 +139,30 @@ originURL = [NSURL URLWithString:@"git@github.com:libgit2/libgit2.github.com.git"]; }); - if (!userName || !publicKeyPath || !privateKeyPath || !privateKeyPassword) { - pending(@"should handle normal clones (pending environment)"); - } else { + if (userName && publicKeyPath && privateKeyPath && privateKeyPassword) { it(@"should handle clones", ^{ __block NSError *error = nil; provider = [GTCredentialProvider providerWithBlock:^GTCredential *(GTCredentialType type, NSString *URL, NSString *credUserName) { - expect(URL).to.equal(originURL.absoluteString); - expect(type & GTCredentialTypeSSHKey).to.beTruthy(); + expect(URL).to(equal(originURL.absoluteString)); + expect(@(type & GTCredentialTypeSSHKey)).to(beTruthy()); GTCredential *cred = nil; // cred = [GTCredential credentialWithUserName:userName password:password error:&error]; cred = [GTCredential credentialWithUserName:credUserName publicKeyURL:[NSURL fileURLWithPath:publicKeyPath] privateKeyURL:[NSURL fileURLWithPath:privateKeyPath] passphrase:privateKeyPassword error:&error]; - expect(cred).notTo.beNil(); - expect(error).to.beNil(); + expect(cred).notTo(beNil()); + expect(error).to(beNil()); return cred; }]; repository = [GTRepository cloneFromURL:originURL toWorkingDirectory:workdirURL options:@{GTRepositoryCloneOptionsCredentialProvider: provider} error:&error transferProgressBlock:transferProgressBlock checkoutProgressBlock:checkoutProgressBlock]; - expect(repository).notTo.beNil(); - expect(error).to.beNil(); - expect(transferProgressCalled).to.beTruthy(); - expect(checkoutProgressCalled).to.beTruthy(); + expect(repository).notTo(beNil()); + expect(error).to(beNil()); + expect(@(transferProgressCalled)).to(beTruthy()); + expect(@(checkoutProgressCalled)).to(beTruthy()); GTRemote *originRemote = [GTRemote remoteWithName:@"origin" inRepository:repository error:&error]; - expect(error).to.beNil(); - expect(originRemote.URLString).to.equal(originURL.absoluteString); + expect(error).to(beNil()); + expect(originRemote.URLString).to(equal(originURL.absoluteString)); }); } }); @@ -173,35 +172,35 @@ it(@"should allow HEAD to be looked up", ^{ NSError *error = nil; GTReference *head = [self.bareFixtureRepository headReferenceWithError:&error]; - expect(head).notTo.beNil(); - expect(error).to.beNil(); - expect(head.targetSHA).to.equal(@"36060c58702ed4c2a40832c51758d5344201d89a"); - expect(head.referenceType).to.equal(GTReferenceTypeOid); + expect(head).notTo(beNil()); + expect(error).to(beNil()); + expect(head.targetSHA).to(equal(@"36060c58702ed4c2a40832c51758d5344201d89a")); + expect(@(head.referenceType)).to(equal(@(GTReferenceTypeOid))); }); it(@"should fail to return HEAD for an unborn repo", ^{ GTRepository *repo = self.blankFixtureRepository; - expect(repo.isHEADUnborn).to.beTruthy(); + expect(@(repo.isHEADUnborn)).to(beTruthy()); NSError *error = nil; GTReference *head = [repo headReferenceWithError:&error]; - expect(head).to.beNil(); - expect(error).notTo.beNil(); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_EUNBORNBRANCH); + expect(head).to(beNil()); + expect(error).notTo(beNil()); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_EUNBORNBRANCH))); }); }); describe(@"-isEmpty", ^{ it(@"should return NO for a non-empty repository", ^{ - expect(repository.isEmpty).to.beFalsy(); + expect(@(repository.isEmpty)).to(beFalsy()); }); it(@"should return YES for a new repository", ^{ NSError *error = nil; NSURL *fileURL = [self.tempDirectoryFileURL URLByAppendingPathComponent:@"newrepo"]; GTRepository *newRepo = [GTRepository initializeEmptyRepositoryAtFileURL:fileURL error:&error]; - expect(newRepo.isEmpty).to.beTruthy(); + expect(@(newRepo.isEmpty)).to(beTruthy()); [NSFileManager.defaultManager removeItemAtURL:fileURL error:NULL]; }); }); @@ -209,17 +208,17 @@ describe(@"-preparedMessage", ^{ it(@"should return nil by default", ^{ __block NSError *error = nil; - expect([repository preparedMessageWithError:&error]).to.beNil(); - expect(error).to.beNil(); + expect([repository preparedMessageWithError:&error]).to(beNil()); + expect(error).to(beNil()); }); it(@"should return the contents of MERGE_MSG", ^{ NSString *message = @"Commit summary\n\ndescription"; - expect([message writeToURL:[repository.gitDirectoryURL URLByAppendingPathComponent:@"MERGE_MSG"] atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); + expect(@([message writeToURL:[repository.gitDirectoryURL URLByAppendingPathComponent:@"MERGE_MSG"] atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); __block NSError *error = nil; - expect([repository preparedMessageWithError:&error]).to.equal(message); - expect(error).to.beNil(); + expect([repository preparedMessageWithError:&error]).to(equal(message)); + expect(error).to(beNil()); }); }); @@ -227,16 +226,16 @@ it(@"should find the merge base between two branches", ^{ NSError *error = nil; GTBranch *masterBranch = [repository lookUpBranchWithName:@"master" type:GTBranchTypeLocal success:NULL error:&error]; - expect(masterBranch).notTo.beNil(); - expect(error).to.beNil(); + expect(masterBranch).notTo(beNil()); + expect(error).to(beNil()); GTBranch *otherBranch = [repository lookUpBranchWithName:@"other-branch" type:GTBranchTypeLocal success:NULL error:&error]; - expect(otherBranch).notTo.beNil(); - expect(error).to.beNil(); + expect(otherBranch).notTo(beNil()); + expect(error).to(beNil()); GTCommit *mergeBase = [repository mergeBaseBetweenFirstOID:masterBranch.reference.OID secondOID:otherBranch.reference.OID error:&error]; - expect(mergeBase).notTo.beNil(); - expect(mergeBase.SHA).to.equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"); + expect(mergeBase).notTo(beNil()); + expect(mergeBase.SHA).to(equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0")); }); }); @@ -244,8 +243,8 @@ it(@"should return all tags", ^{ NSError *error = nil; NSArray *tags = [repository allTagsWithError:&error]; - expect(tags).notTo.beNil(); - expect(tags.count).to.equal(0); + expect(tags).notTo(beNil()); + expect(@(tags.count)).to(equal(@0)); }); }); @@ -253,27 +252,27 @@ it(@"should return the current branch", ^{ NSError *error = nil; GTBranch *currentBranch = [repository currentBranchWithError:&error]; - expect(currentBranch).notTo.beNil(); - expect(error).to.beNil(); - expect(currentBranch.name).to.equal(@"refs/heads/master"); + expect(currentBranch).notTo(beNil()); + expect(error).to(beNil()); + expect(currentBranch.name).to(equal(@"refs/heads/master")); }); }); describe(@"-createBranchNamed:fromOID:committer:message:error:", ^{ it(@"should create a local branch from the given OID", ^{ GTBranch *currentBranch = [repository currentBranchWithError:NULL]; - expect(currentBranch).notTo.beNil(); + expect(currentBranch).notTo(beNil()); NSString *branchName = @"new-test-branch"; NSError *error = nil; GTBranch *newBranch = [repository createBranchNamed:branchName fromOID:[[GTOID alloc] initWithSHA:currentBranch.SHA] committer:nil message:nil error:&error]; - expect(newBranch).notTo.beNil(); - expect(error).to.beNil(); + expect(newBranch).notTo(beNil()); + expect(error).to(beNil()); - expect(newBranch.shortName).to.equal(branchName); - expect(newBranch.branchType).to.equal(GTBranchTypeLocal); - expect(newBranch.SHA).to.equal(currentBranch.SHA); + expect(newBranch.shortName).to(equal(branchName)); + expect(@(newBranch.branchType)).to(equal(@(GTBranchTypeLocal))); + expect(newBranch.SHA).to(equal(currentBranch.SHA)); }); }); @@ -281,9 +280,9 @@ it(@"should return the local branches", ^{ NSError *error = nil; NSArray *branches = [repository localBranchesWithError:&error]; - expect(branches).notTo.beNil(); - expect(error).to.beNil(); - expect(branches.count).to.equal(13); + expect(branches).notTo(beNil()); + expect(error).to(beNil()); + expect(@(branches.count)).to(equal(@13)); }); }); @@ -291,11 +290,11 @@ it(@"should return remote branches", ^{ NSError *error = nil; NSArray *branches = [repository remoteBranchesWithError:&error]; - expect(branches).notTo.beNil(); - expect(error).to.beNil(); - expect(branches.count).to.equal(1); + expect(branches).notTo(beNil()); + expect(error).to(beNil()); + expect(@(branches.count)).to(equal(@1)); GTBranch *remoteBranch = branches[0]; - expect(remoteBranch.name).to.equal(@"refs/remotes/origin/master"); + expect(remoteBranch.name).to(equal(@"refs/remotes/origin/master")); }); }); @@ -303,12 +302,12 @@ it(@"should return reference names", ^{ NSError *error = nil; NSArray *refs = [self.bareFixtureRepository referenceNamesWithError:&error]; - expect(refs).notTo.beNil(); - expect(error).to.beNil(); + expect(refs).notTo(beNil()); + expect(error).to(beNil()); - expect(refs.count).to.equal(4); + expect(@(refs.count)).to(equal(@4)); NSArray *expectedRefs = @[ @"refs/heads/master", @"refs/tags/v0.9", @"refs/tags/v1.0", @"refs/heads/packed" ]; - expect(refs).to.equal(expectedRefs); + expect(refs).to(equal(expectedRefs)); }); }); @@ -320,17 +319,17 @@ GTTag *tag = (GTTag *)[repo lookUpObjectBySHA:SHA error:&error]; GTOID *newOID = [repo OIDByCreatingTagNamed:@"a_new_tag" target:tag.target tagger:tag.tagger message:@"my tag\n" error:&error]; - expect(newOID).notTo.beNil(); + expect(newOID).notTo(beNil()); tag = (GTTag *)[repo lookUpObjectByOID:newOID error:&error]; - expect(error).to.beNil(); - expect(tag).notTo.beNil(); - expect(newOID.SHA).to.equal(tag.SHA); - expect(tag.type).to.equal(@"tag"); - expect(tag.message).to.equal(@"my tag\n"); - expect(tag.name).to.equal(@"a_new_tag"); - expect(tag.target.SHA).to.equal(@"5b5b025afb0b4c913b4c338a42934a3863bf3644"); - expect(tag.targetType).to.equal(GTObjectTypeCommit); + expect(error).to(beNil()); + expect(tag).notTo(beNil()); + expect(newOID.SHA).to(equal(tag.SHA)); + expect(tag.type).to(equal(@"tag")); + expect(tag.message).to(equal(@"my tag\n")); + expect(tag.name).to(equal(@"a_new_tag")); + expect(tag.target.SHA).to(equal(@"5b5b025afb0b4c913b4c338a42934a3863bf3644")); + expect(@(tag.targetType)).to(equal(@(GTObjectTypeCommit))); }); it(@"should fail to create an already existing tag", ^{ @@ -340,8 +339,8 @@ GTTag *tag = (GTTag *)[repo lookUpObjectBySHA:SHA error:&error]; GTOID *OID = [repo OIDByCreatingTagNamed:tag.name target:tag.target tagger:tag.tagger message:@"new message" error:&error]; - expect(OID).to.beNil(); - expect(error).notTo.beNil(); + expect(OID).to(beNil()); + expect(error).notTo(beNil()); }); }); @@ -349,21 +348,21 @@ it(@"should allow references", ^{ NSError *error = nil; GTReference *ref = [GTReference referenceByLookingUpReferencedNamed:@"refs/heads/other-branch" inRepository:repository error:&error]; - expect(ref).to.beTruthy(); - expect(error.localizedDescription).to.beNil(); + expect(ref).notTo(beNil()); + expect(error.localizedDescription).to(beNil()); BOOL result = [repository checkoutReference:ref strategy:GTCheckoutStrategyAllowConflicts error:&error progressBlock:nil]; - expect(result).to.beTruthy(); - expect(error.localizedDescription).to.beNil(); + expect(@(result)).to(beTruthy()); + expect(error.localizedDescription).to(beNil()); }); - + it(@"should allow commits", ^{ NSError *error = nil; GTCommit *commit = [repository lookUpObjectBySHA:@"1d69f3c0aeaf0d62e25591987b93b8ffc53abd77" objectType:GTObjectTypeCommit error:&error]; - expect(commit).to.beTruthy(); - expect(error.localizedDescription).to.beNil(); + expect(commit).notTo(beNil()); + expect(error.localizedDescription).to(beNil()); BOOL result = [repository checkoutCommit:commit strategy:GTCheckoutStrategyAllowConflicts error:&error progressBlock:nil]; - expect(result).to.beTruthy(); - expect(error.localizedDescription).to.beNil(); + expect(@(result)).to(beTruthy()); + expect(error.localizedDescription).to(beNil()); }); }); @@ -371,20 +370,20 @@ it(@"allows access to remote names", ^{ NSError *error = nil; NSArray *remoteNames = [repository remoteNamesWithError:&error]; - expect(error.localizedDescription).to.beNil(); - expect(remoteNames).notTo.beNil(); + expect(error.localizedDescription).to(beNil()); + expect(remoteNames).notTo(beNil()); }); it(@"returns remote names if there are any", ^{ NSError *error = nil; NSString *remoteName = @"testremote"; GTRemote *remote = [GTRemote createRemoteWithName:remoteName URLString:@"git://user@example.com/testrepo" inRepository:repository error:&error]; - expect(error.localizedDescription).to.beNil(); - expect(remote).notTo.beNil(); + expect(error.localizedDescription).to(beNil()); + expect(remote).notTo(beNil()); NSArray *remoteNames = [repository remoteNamesWithError:&error]; - expect(error.localizedDescription).to.beNil(); - expect(remoteNames).to.contain(remoteName); + expect(error.localizedDescription).to(beNil()); + expect(remoteNames).to(contain(remoteName)); }); }); @@ -399,24 +398,24 @@ NSString *resetTargetSHA = @"8496071c1b46c854b31185ea97743be6a8774479"; GTCommit *commit = [repository lookUpObjectBySHA:resetTargetSHA error:NULL]; - expect(commit).notTo.beNil(); + expect(commit).notTo(beNil()); GTCommit *originalHeadCommit = [repository lookUpObjectBySHA:originalHead.targetSHA error:NULL]; - expect(originalHeadCommit).notTo.beNil(); + expect(originalHeadCommit).notTo(beNil()); BOOL success = [repository resetToCommit:commit resetType:GTRepositoryResetTypeSoft error:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); GTReference *head = [repository headReferenceWithError:&error]; - expect(head).notTo.beNil(); - expect(head.targetSHA).to.equal(resetTargetSHA); + expect(head).notTo(beNil()); + expect(head.targetSHA).to(equal(resetTargetSHA)); success = [repository resetToCommit:originalHeadCommit resetType:GTRepositoryResetTypeSoft error:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); head = [repository headReferenceWithError:&error]; - expect(head.targetSHA).to.equal(originalHead.targetSHA); + expect(head.targetSHA).to(equal(originalHead.targetSHA)); }); }); @@ -426,9 +425,9 @@ BOOL success = NO; GTBranch *branch = [repository lookUpBranchWithName:@"master" type:GTBranchTypeLocal success:&success error:&error]; - expect(branch).notTo.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(branch).notTo(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should look up a remote branch", ^{ @@ -436,9 +435,9 @@ BOOL success = NO; GTBranch *branch = [repository lookUpBranchWithName:@"origin/master" type:GTBranchTypeRemote success:&success error:&error]; - expect(branch).notTo.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(branch).notTo(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); it(@"should return nil for a nonexistent branch", ^{ @@ -446,9 +445,9 @@ BOOL success = NO; GTBranch *branch = [repository lookUpBranchWithName:@"foobar" type:GTBranchTypeLocal success:&success error:&error]; - expect(branch).to.beNil(); - expect(success).to.beTruthy(); - expect(error).to.beNil(); + expect(branch).to(beNil()); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); }); }); @@ -458,12 +457,12 @@ GTObject *obj = [repository lookUpObjectByRevParse:spec error:&error]; if (SHA != nil) { - expect(error).to.beNil(); - expect(obj).notTo.beNil(); - expect(obj.SHA).to.equal(SHA); + expect(error).to(beNil()); + expect(obj).notTo(beNil()); + expect(obj.SHA).to(equal(SHA)); } else { - expect(error).notTo.beNil(); - expect(obj).to.beNil(); + expect(error).notTo(beNil()); + expect(obj).to(beNil()); } };; @@ -485,4 +484,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTRepositoryStashingSpec.m b/ObjectiveGitTests/GTRepositoryStashingSpec.m index 946bfe51f..d9973e615 100644 --- a/ObjectiveGitTests/GTRepositoryStashingSpec.m +++ b/ObjectiveGitTests/GTRepositoryStashingSpec.m @@ -6,25 +6,29 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTRepository+Stashing.h" +#import +#import +#import -SpecBegin(GTRepositoryStashing) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTRepositoryStashing) __block GTRepository *repository; beforeEach(^{ repository = self.testAppFixtureRepository; - expect(repository).notTo.beNil(); + expect(repository).notTo(beNil()); }); it(@"should fail to create a stash if there's nothing to stash", ^{ NSError *error = nil; GTCommit *stash = [repository stashChangesWithMessage:nil flags:GTRepositoryStashFlagDefault error:&error]; - expect(stash).to.beNil(); + expect(stash).to(beNil()); - expect(error).notTo.beNil(); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_ENOTFOUND); + expect(error).notTo(beNil()); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_ENOTFOUND))); }); it(@"should create a stash with modified file content", ^{ @@ -32,17 +36,17 @@ NSString *newContent = @"foobar"; NSString *oldContent = [NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]; - expect(oldContent).notTo.equal(newContent); + expect(oldContent).notTo(equal(newContent)); - expect([newContent writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); - expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to.equal(newContent); + expect(@([newContent writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); + expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to(equal(newContent)); NSError *error = nil; GTCommit *stash = [repository stashChangesWithMessage:nil flags:GTRepositoryStashFlagDefault error:&error]; - expect(stash).notTo.beNil(); - expect(error).to.beNil(); + expect(stash).notTo(beNil()); + expect(error).to(beNil()); - expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to.equal(oldContent); + expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to(equal(oldContent)); }); it(@"should create a stash with uncommitted changes", ^{ @@ -50,38 +54,38 @@ NSString *newContent = @"foobar"; NSString *oldContent = [NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]; - expect(oldContent).notTo.equal(newContent); + expect(oldContent).notTo(equal(newContent)); - expect([newContent writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); - expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to.equal(newContent); + expect(@([newContent writeToURL:fileURL atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); + expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to(equal(newContent)); NSError *error = nil; GTCommit *stash = [repository stashChangesWithMessage:nil flags:GTRepositoryStashFlagDefault error:&error]; - expect(stash).notTo.beNil(); - expect(error).to.beNil(); + expect(stash).notTo(beNil()); + expect(error).to(beNil()); - expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to.equal(oldContent); + expect([NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:NULL]).to(equal(oldContent)); }); it(@"should fail to create a stash with an untracked file using default options", ^{ - expect([@"foobar" writeToURL:[repository.fileURL URLByAppendingPathComponent:@"new-test-file"] atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); + expect(@([@"foobar" writeToURL:[repository.fileURL URLByAppendingPathComponent:@"new-test-file"] atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); NSError *error = nil; GTCommit *stash = [repository stashChangesWithMessage:nil flags:GTRepositoryStashFlagDefault error:&error]; - expect(stash).to.beNil(); + expect(stash).to(beNil()); - expect(error).notTo.beNil(); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_ENOTFOUND); + expect(error).notTo(beNil()); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_ENOTFOUND))); }); it(@"should stash an untracked file when enabled", ^{ - expect([@"foobar" writeToURL:[repository.fileURL URLByAppendingPathComponent:@"new-test-file"] atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); + expect(@([@"foobar" writeToURL:[repository.fileURL URLByAppendingPathComponent:@"new-test-file"] atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); NSError *error = nil; GTCommit *stash = [repository stashChangesWithMessage:nil flags:GTRepositoryStashFlagIncludeUntracked error:&error]; - expect(stash).notTo.beNil(); - expect(error).to.beNil(); + expect(stash).notTo(beNil()); + expect(error).to(beNil()); }); it(@"should enumerate stashes", ^{ @@ -90,14 +94,14 @@ for (int i = stashCount; i >= 0; i--) { NSString *filename = [NSString stringWithFormat:@"new-test-file-%i", i]; - expect([@"foobar" writeToURL:[repository.fileURL URLByAppendingPathComponent:filename] atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); + expect(@([@"foobar" writeToURL:[repository.fileURL URLByAppendingPathComponent:filename] atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); NSString *message = [NSString stringWithFormat:@"stash %i", i]; NSError *error = nil; GTCommit *stash = [repository stashChangesWithMessage:message flags:GTRepositoryStashFlagIncludeUntracked error:&error]; - expect(stash).notTo.beNil(); - expect(error).to.beNil(); + expect(stash).notTo(beNil()); + expect(error).to(beNil()); [stashCommits insertObject:stash atIndex:0]; } @@ -107,17 +111,17 @@ lastIndex = i; NSString *expectedMessage = [NSString stringWithFormat:@"On master: stash %lu", (unsigned long)i]; - expect(oid).to.equal([stashCommits[i] OID]); - expect(message).to.equal(expectedMessage); + expect(oid).to(equal([stashCommits[i] OID])); + expect(message).to(equal(expectedMessage)); if (i == 2) *stop = YES; }]; - expect(lastIndex).to.equal(2); + expect(@(lastIndex)).to(equal(@2)); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTSignatureSpec.m b/ObjectiveGitTests/GTSignatureSpec.m index ca65e372f..266f07295 100644 --- a/ObjectiveGitTests/GTSignatureSpec.m +++ b/ObjectiveGitTests/GTSignatureSpec.m @@ -6,7 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -SpecBegin(GTSignature) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTSignatureSpec) NSString *name = @"test_user"; NSString *email = @"test@example.com"; @@ -22,20 +28,20 @@ beforeEach(^{ testSignature = [[GTSignature alloc] initWithName:name email:email time:time]; - expect(testSignature).notTo.beNil(); + expect(testSignature).notTo(beNil()); }); it(@"should expose the git_signature", ^{ - expect(testSignature.git_signature).notTo.beNil(); - expect(testSignature).to.equal([[GTSignature alloc] initWithGitSignature:testSignature.git_signature]); + expect([NSValue valueWithPointer:testSignature.git_signature]).notTo(equal([NSValue valueWithPointer:NULL])); + expect(testSignature).to(equal([[GTSignature alloc] initWithGitSignature:testSignature.git_signature])); }); it(@"should compare equal to a signature created with the same information", ^{ - expect(testSignature).to.equal([[GTSignature alloc] initWithName:name email:email time:time]); + expect(testSignature).to(equal([[GTSignature alloc] initWithName:name email:email time:time])); }); it(@"should compare unequal to a different signature", ^{ - expect(testSignature).notTo.equal([[GTSignature alloc] initWithName:name email:email time:[NSDate dateWithTimeIntervalSinceNow:10]]); + expect(testSignature).notTo(equal([[GTSignature alloc] initWithName:name email:email time:[NSDate dateWithTimeIntervalSinceNow:10]])); }); }); @@ -48,12 +54,12 @@ } GTSignature *testSignature = [[GTSignature alloc] initWithGitSignature:git_signature]; - expect(testSignature.name).to.equal(name); - expect(testSignature.email).to.equal(email); + expect(testSignature.name).to(equal(name)); + expect(testSignature.email).to(equal(email)); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTSubmoduleSpec.m b/ObjectiveGitTests/GTSubmoduleSpec.m index 04a921e6a..bfc569366 100644 --- a/ObjectiveGitTests/GTSubmoduleSpec.m +++ b/ObjectiveGitTests/GTSubmoduleSpec.m @@ -6,43 +6,45 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -SpecBegin(GTSubmodule) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTSubmoduleSpec) __block GTRepository *repo; beforeEach(^{ repo = self.submoduleFixtureRepository; - expect(repo).notTo.beNil(); + expect(repo).notTo(beNil()); }); it(@"should enumerate top-level submodules", ^{ NSMutableSet *names = [NSMutableSet set]; [repo enumerateSubmodulesRecursively:NO usingBlock:^(GTSubmodule *submodule, NSError *error, BOOL *stop) { - expect(stop).notTo.beNil(); - - expect(submodule).to.beKindOf(GTSubmodule.class); - expect(submodule.name).notTo.beNil(); + expect(submodule).to(beAnInstanceOf(GTSubmodule.class)); + expect(submodule.name).notTo(beNil()); [names addObject:submodule.name]; }]; NSSet *expectedNames = [NSSet setWithArray:@[ @"Archimedes", @"Test_App", @"Test_App2" ]]; - expect(names).to.equal(expectedNames); + expect(names).to(equal(expectedNames)); }); it(@"should enumerate submodules recursively", ^{ NSMutableSet *names = [NSMutableSet set]; [repo enumerateSubmodulesRecursively:YES usingBlock:^(GTSubmodule *submodule, NSError *error, BOOL *stop) { - expect(stop).notTo.beNil(); - - expect(submodule).to.beKindOf(GTSubmodule.class); - expect(submodule.name).notTo.beNil(); + expect(submodule).to(beAnInstanceOf(GTSubmodule.class)); + expect(submodule.name).notTo(beNil()); [names addObject:submodule.name]; }]; NSSet *expectedNames = [NSSet setWithArray:@[ @"Archimedes", @"Configuration", @"ArchimedesTests/expecta", @"ArchimedesTests/specta", @"Test_App", @"Test_App2" ]]; - expect(names).to.equal(expectedNames); + expect(names).to(equal(expectedNames)); }); it(@"should terminate enumeration early", ^{ @@ -55,61 +57,61 @@ } }]; - expect(count).to.equal(2); + expect(@(count)).to(equal(@2)); }); it(@"should write to the parent .git/config", ^{ NSString *testURLString = @"fake_url"; GTSubmodule *submodule = [repo submoduleWithName:@"Test_App" error:NULL]; - expect(submodule).notTo.beNil(); - expect(@(git_submodule_url(submodule.git_submodule))).notTo.equal(testURLString); + expect(submodule).notTo(beNil()); + expect(@(git_submodule_url(submodule.git_submodule))).notTo(equal(testURLString)); git_submodule_set_url(submodule.git_submodule, testURLString.UTF8String); git_submodule_save(submodule.git_submodule); __block NSError *error = nil; - expect([submodule writeToParentConfigurationDestructively:YES error:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([submodule writeToParentConfigurationDestructively:YES error:&error])).to(beTruthy()); + expect(error).to(beNil()); submodule = [repo submoduleWithName:@"Test_App" error:NULL]; - expect(submodule).notTo.beNil(); - expect(@(git_submodule_url(submodule.git_submodule))).to.equal(testURLString); + expect(submodule).notTo(beNil()); + expect(@(git_submodule_url(submodule.git_submodule))).to(equal(testURLString)); }); it(@"should reload all submodules", ^{ GTSubmodule *submodule = [repo submoduleWithName:@"new_submodule" error:NULL]; - expect(submodule).to.beNil(); + expect(submodule).to(beNil()); NSURL *gitmodulesURL = [repo.fileURL URLByAppendingPathComponent:@".gitmodules"]; NSMutableString *gitmodules = [NSMutableString stringWithContentsOfURL:gitmodulesURL usedEncoding:NULL error:NULL]; - expect(gitmodules).notTo.beNil(); + expect(gitmodules).notTo(beNil()); [gitmodules appendString:@"[submodule \"new_submodule\"]\n\turl = some_url\n\tpath = new_submodule_path"]; - expect([gitmodules writeToURL:gitmodulesURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]).to.beTruthy(); + expect(@([gitmodules writeToURL:gitmodulesURL atomically:YES encoding:NSUTF8StringEncoding error:NULL])).to(beTruthy()); __block NSError *error = nil; - expect([repo reloadSubmodules:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([repo reloadSubmodules:&error])).to(beTruthy()); + expect(error).to(beNil()); submodule = [repo submoduleWithName:@"new_submodule" error:NULL]; - expect(submodule).notTo.beNil(); - expect(submodule.path).to.equal(@"new_submodule_path"); + expect(submodule).notTo(beNil()); + expect(submodule.path).to(equal(@"new_submodule_path")); }); it(@"should add its HEAD to its parent's index", ^{ GTSubmodule *submodule = [repo submoduleWithName:@"Test_App" error:NULL]; - expect(submodule).notTo.beNil(); + expect(submodule).notTo(beNil()); GTRepository *submoduleRepository = [[GTRepository alloc] initWithURL:[repo.fileURL URLByAppendingPathComponent:submodule.path] error:NULL]; - expect(submoduleRepository).notTo.beNil(); + expect(submoduleRepository).notTo(beNil()); GTCommit *commit = [submoduleRepository lookUpObjectByRevParse:@"HEAD^" error:NULL]; BOOL success = [submoduleRepository checkoutCommit:commit strategy:GTCheckoutStrategyForce error:NULL progressBlock:nil]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); success = [submodule addToIndex:NULL]; - expect(success).to.beTruthy(); + expect(@(success)).to(beTruthy()); }); describe(@"clean, checked out submodule", ^{ @@ -118,66 +120,66 @@ beforeEach(^{ NSError *error = nil; submodule = [repo submoduleWithName:@"Test_App" error:&error]; - expect(submodule).notTo.beNil(); - expect(error).to.beNil(); - - expect(submodule.name).to.equal(@"Test_App"); - expect(submodule.path).to.equal(@"Test_App"); - expect(submodule.URLString).to.equal(@"../Test_App"); - expect(submodule.parentRepository).to.beIdenticalTo(repo); - expect(submodule.git_submodule).notTo.beNil(); + expect(submodule).notTo(beNil()); + expect(error).to(beNil()); + + expect(submodule.name).to(equal(@"Test_App")); + expect(submodule.path).to(equal(@"Test_App")); + expect(submodule.URLString).to(equal(@"../Test_App")); + expect(submodule.parentRepository).to(beIdenticalTo(repo)); + expect([NSValue valueWithPointer:submodule.git_submodule]).notTo(equal([NSValue valueWithPointer:NULL])); }); it(@"should compare equal to the same submodule", ^{ - expect(submodule).to.equal([repo submoduleWithName:@"Test_App" error:NULL]); + expect(submodule).to(equal([repo submoduleWithName:@"Test_App" error:NULL])); }); it(@"should compare unequal to a different submodule", ^{ - expect(submodule).notTo.equal([repo submoduleWithName:@"Test_App2" error:NULL]); + expect(submodule).notTo(equal([repo submoduleWithName:@"Test_App2" error:NULL])); }); it(@"should have identical OIDs", ^{ - expect(submodule.HEADOID.SHA).to.equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"); - expect(submodule.indexOID.SHA).to.equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"); - expect(submodule.workingDirectoryOID.SHA).to.equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0"); + expect(submodule.HEADOID.SHA).to(equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0")); + expect(submodule.indexOID.SHA).to(equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0")); + expect(submodule.workingDirectoryOID.SHA).to(equal(@"f7ecd8f4404d3a388efbff6711f1bdf28ffd16a0")); }); it(@"should have a clean status", ^{ GTSubmoduleStatus expectedStatus = GTSubmoduleStatusExistsInHEAD | GTSubmoduleStatusExistsInIndex | GTSubmoduleStatusExistsInConfig | GTSubmoduleStatusExistsInWorkingDirectory; __block NSError *error = nil; - expect([submodule status:&error]).to.equal(expectedStatus); - expect(error).to.beNil(); + expect(@([submodule status:&error])).to(equal(@(expectedStatus))); + expect(error).to(beNil()); }); it(@"should open a repository" ,^{ NSError *error = nil; GTRepository *submoduleRepo = [submodule submoduleRepository:&error]; - expect(submoduleRepo).notTo.beNil(); - expect(error).to.beNil(); - - expect(submoduleRepo.fileURL).to.equal([repo.fileURL URLByAppendingPathComponent:@"Test_App"]); - expect(submoduleRepo.bare).to.beFalsy(); - expect(submoduleRepo.empty).to.beFalsy(); - expect(submoduleRepo.HEADDetached).to.beTruthy(); - expect([submoduleRepo isWorkingDirectoryClean]).to.beTruthy(); + expect(submoduleRepo).notTo(beNil()); + expect(error).to(beNil()); + + expect(submoduleRepo.fileURL).to(equal([repo.fileURL URLByAppendingPathComponent:@"Test_App"])); + expect(@(submoduleRepo.bare)).to(beFalsy()); + expect(@(submoduleRepo.empty)).to(beFalsy()); + expect(@(submoduleRepo.HEADDetached)).to(beTruthy()); + expect(@([submoduleRepo isWorkingDirectoryClean])).to(beTruthy()); }); it(@"should reload", ^{ GTRepository *submoduleRepo = [submodule submoduleRepository:NULL]; - expect(submoduleRepo).notTo.beNil(); + expect(submoduleRepo).notTo(beNil()); GTCommit *newHEAD = (id)[submoduleRepo lookUpObjectBySHA:@"82dc47f6ba3beecab33080a1136d8913098e1801" objectType:GTObjectTypeCommit error:NULL]; - expect(newHEAD).notTo.beNil(); - expect([submoduleRepo resetToCommit:newHEAD resetType:GTRepositoryResetTypeHard error:NULL]).to.beTruthy(); + expect(newHEAD).notTo(beNil()); + expect(@([submoduleRepo resetToCommit:newHEAD resetType:GTRepositoryResetTypeHard error:NULL])).to(beTruthy()); - expect(submodule.workingDirectoryOID.SHA).notTo.equal(newHEAD.SHA); + expect(submodule.workingDirectoryOID.SHA).notTo(equal(newHEAD.SHA)); __block NSError *error = nil; - expect([submodule reload:&error]).to.beTruthy(); - expect(error).to.beNil(); + expect(@([submodule reload:&error])).to(beTruthy()); + expect(error).to(beNil()); - expect(submodule.workingDirectoryOID.SHA).to.equal(newHEAD.SHA); + expect(submodule.workingDirectoryOID.SHA).to(equal(newHEAD.SHA)); }); }); @@ -187,28 +189,28 @@ beforeEach(^{ NSError *error = nil; submodule = [repo submoduleWithName:@"Test_App2" error:&error]; - expect(submodule).notTo.beNil(); - expect(error).to.beNil(); - - expect(submodule.name).to.equal(@"Test_App2"); - expect(submodule.path).to.equal(@"Test_App2"); - expect(submodule.URLString).to.equal(@"../Test_App"); - expect(submodule.parentRepository).to.beIdenticalTo(repo); - expect(submodule.git_submodule).notTo.beNil(); + expect(submodule).notTo(beNil()); + expect(error).to(beNil()); + + expect(submodule.name).to(equal(@"Test_App2")); + expect(submodule.path).to(equal(@"Test_App2")); + expect(submodule.URLString).to(equal(@"../Test_App")); + expect(submodule.parentRepository).to(beIdenticalTo(repo)); + expect([NSValue valueWithPointer:submodule.git_submodule]).notTo(equal([NSValue valueWithPointer:NULL])); }); it(@"should compare equal to the same submodule", ^{ - expect(submodule).to.equal([repo submoduleWithName:@"Test_App2" error:NULL]); + expect(submodule).to(equal([repo submoduleWithName:@"Test_App2" error:NULL])); }); it(@"should compare unequal to a different submodule", ^{ - expect(submodule).notTo.equal([repo submoduleWithName:@"Test_App" error:NULL]); + expect(submodule).notTo(equal([repo submoduleWithName:@"Test_App" error:NULL])); }); it(@"should have varying OIDs", ^{ - expect(submodule.HEADOID.SHA).to.equal(@"a4bca6b67a5483169963572ee3da563da33712f7"); - expect(submodule.indexOID.SHA).to.equal(@"93f5b550149f9f4c702c9de9a8b0a8a357f0c41c"); - expect(submodule.workingDirectoryOID.SHA).to.equal(@"1d69f3c0aeaf0d62e25591987b93b8ffc53abd77"); + expect(submodule.HEADOID.SHA).to(equal(@"a4bca6b67a5483169963572ee3da563da33712f7")); + expect(submodule.indexOID.SHA).to(equal(@"93f5b550149f9f4c702c9de9a8b0a8a357f0c41c")); + expect(submodule.workingDirectoryOID.SHA).to(equal(@"1d69f3c0aeaf0d62e25591987b93b8ffc53abd77")); }); it(@"should have a dirty status", ^{ @@ -218,8 +220,8 @@ GTSubmoduleStatusDirtyIndex | GTSubmoduleStatusDirtyWorkingDirectory | GTSubmoduleStatusUntrackedFilesInWorkingDirectory; __block NSError *error = nil; - expect([submodule status:&error]).to.equal(expectedStatus); - expect(error).to.beNil(); + expect(@([submodule status:&error])).to(equal(@(expectedStatus))); + expect(error).to(beNil()); }); it(@"should honor the ignore rule", ^{ @@ -229,38 +231,38 @@ GTSubmoduleStatusExistsInHEAD | GTSubmoduleStatusExistsInIndex | GTSubmoduleStatusExistsInConfig | GTSubmoduleStatusExistsInWorkingDirectory | GTSubmoduleStatusModifiedInIndex | GTSubmoduleStatusModifiedInWorkingDirectory; - expect([submodule status:NULL]).to.equal(expectedStatus); + expect(@([submodule status:NULL])).to(equal(@(expectedStatus))); }); it(@"should open a repository" ,^{ NSError *error = nil; GTRepository *submoduleRepo = [submodule submoduleRepository:&error]; - expect(submoduleRepo).notTo.beNil(); - expect(error).to.beNil(); - - expect(submoduleRepo.fileURL).to.equal([repo.fileURL URLByAppendingPathComponent:@"Test_App2"]); - expect(submoduleRepo.bare).to.beFalsy(); - expect(submoduleRepo.empty).to.beFalsy(); - expect(submoduleRepo.HEADDetached).to.beTruthy(); - expect([submoduleRepo isWorkingDirectoryClean]).to.beFalsy(); + expect(submoduleRepo).notTo(beNil()); + expect(error).to(beNil()); + + expect(submoduleRepo.fileURL).to(equal([repo.fileURL URLByAppendingPathComponent:@"Test_App2"])); + expect(@(submoduleRepo.bare)).to(beFalsy()); + expect(@(submoduleRepo.empty)).to(beFalsy()); + expect(@(submoduleRepo.HEADDetached)).to(beTruthy()); + expect(@([submoduleRepo isWorkingDirectoryClean])).to(beFalsy()); }); it(@"should synchronize the remote URL", ^{ GTConfiguration *config = [repo configurationWithError:NULL]; - expect(config).notTo.beNil(); + expect(config).notTo(beNil()); NSString *configKey = @"submodule.Test_App2.url"; NSString *newOrigin = @"https://github.com/libgit2/objective-git.git"; [config setString:newOrigin forKey:configKey]; - expect([config refresh:NULL]).to.beTruthy(); - expect([config stringForKey:configKey]).to.equal(newOrigin); + expect(@([config refresh:NULL])).to(beTruthy()); + expect([config stringForKey:configKey]).to(equal(newOrigin)); __block NSError *error = nil; - expect([submodule sync:&error]).to.beTruthy(); + expect(@([submodule sync:&error])).to(beTruthy()); - expect([config refresh:NULL]).to.beTruthy(); - expect([config stringForKey:configKey]).to.equal(@"../Test_App"); + expect(@([config refresh:NULL])).to(beTruthy()); + expect([config stringForKey:configKey]).to(equal(@"../Test_App")); }); }); @@ -268,4 +270,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTTagSpec.m b/ObjectiveGitTests/GTTagSpec.m index c8b2f71f2..b6ab16506 100644 --- a/ObjectiveGitTests/GTTagSpec.m +++ b/ObjectiveGitTests/GTTagSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTTag.h" +#import +#import +#import -SpecBegin(GTTag) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTTagSpec) __block GTTag *tag; @@ -17,26 +21,26 @@ GTRepository *repo = self.bareFixtureRepository; NSString *tagSHA = @"0c37a5391bbff43c37f0d0371823a5509eed5b1d"; tag = (GTTag *)[repo lookUpObjectBySHA:tagSHA error:&error]; - expect(error).to.beFalsy(); - expect(tag).to.beTruthy(); - expect(tagSHA).to.equal(tag.SHA); + expect(error).to(beNil()); + expect(tag).notTo(beNil()); + expect(tagSHA).to(equal(tag.SHA)); }); it(@"can read tag data", ^{ - expect(tag.type).to.equal(@"tag"); - expect(tag.name).to.equal(@"v1.0"); - expect(tag.message).to.equal(@"test tag message\n"); - expect(tag.target.SHA).to.equal(@"5b5b025afb0b4c913b4c338a42934a3863bf3644"); - expect(GTObjectTypeCommit).to.equal(tag.targetType); - + expect(tag.type).to(equal(@"tag")); + expect(tag.name).to(equal(@"v1.0")); + expect(tag.message).to(equal(@"test tag message\n")); + expect(tag.target.SHA).to(equal(@"5b5b025afb0b4c913b4c338a42934a3863bf3644")); + expect(@(GTObjectTypeCommit)).to(equal(@(tag.targetType))); + GTSignature *signature = tag.tagger; - expect(signature.name).to.equal(@"Scott Chacon"); - expect((int)[signature.time timeIntervalSince1970]).to.equal(1288114383); - expect(signature.email).to.equal(@"schacon@gmail.com"); + expect(signature.name).to(equal(@"Scott Chacon")); + expect(@(signature.time.timeIntervalSince1970)).to(equal(@1288114383)); + expect(signature.email).to(equal(@"schacon@gmail.com")); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTTimeAdditionsSpec.m b/ObjectiveGitTests/GTTimeAdditionsSpec.m index 75d6c485f..c63cb9dbf 100644 --- a/ObjectiveGitTests/GTTimeAdditionsSpec.m +++ b/ObjectiveGitTests/GTTimeAdditionsSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "NSDate+GTTimeAdditions.h" +#import +#import +#import -SpecBegin(GTTimeAdditions) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(GTTimeAdditions) describe(@"Conversion between git_time and NSDate", ^{ it(@"should be able to create a correct NSDate and NSTimeZone when given a git_time", ^{ @@ -16,38 +20,28 @@ int offset = -120; //2 hours behind GMT git_time time = (git_time){ .time = seconds, .offset = offset }; NSDate *date = [NSDate gt_dateFromGitTime:time]; - expect(date).toNot.beNil(); - - NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; + expect(date).notTo(beNil()); + + NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; gregorianCalendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; - NSDateComponents *components = [gregorianCalendar components:NSDayCalendarUnit | NSMonthCalendarUnit | NSYearCalendarUnit | NSHourCalendarUnit fromDate:date]; - expect(components).toNot.beNil(); - - expect(components.day).to.equal(5); - expect(components.month).to.equal(2); - expect(components.year).to.equal(2010); - expect(components.hour).to.equal(13); - + NSDateComponents *components = [gregorianCalendar components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear | NSCalendarUnitHour fromDate:date]; + expect(components).notTo(beNil()); + + expect(@(components.day)).to(equal(@5)); + expect(@(components.month)).to(equal(@2)); + expect(@(components.year)).to(equal(@2010)); + expect(@(components.hour)).to(equal(@13)); + NSTimeZone *timeZone = [NSTimeZone gt_timeZoneFromGitTime:time]; - expect(timeZone).toNot.beNil(); + expect(timeZone).notTo(beNil()); NSInteger expectedSecondsFromGMT = -120 * 60; - expect(timeZone.secondsFromGMT).to.equal(expectedSecondsFromGMT); + expect(@(timeZone.secondsFromGMT)).to(equal(@(expectedSecondsFromGMT))); }); - + it(@"should return a correct offset for an NSTimeZone", ^{ NSTimeZone *timeZone = [NSTimeZone timeZoneForSecondsFromGMT:180 * 60]; - expect(timeZone).toNot.beNil(); - expect(timeZone.gt_gitTimeOffset).to.equal(180); - }); - - it(@"should return a correct git_time for an NSDate", ^{ - NSDate *date = [NSDate dateWithString:@"2010-05-12 18:29:13 +0000"]; - expect(date).toNot.beNil(); - - NSTimeZone *twoHoursAheadOfGMT = [NSTimeZone timeZoneForSecondsFromGMT:120 * 60]; - git_time time = [date gt_gitTimeUsingTimeZone:twoHoursAheadOfGMT]; - expect(time.time).to.equal(1273688953); - expect(time.offset).to.equal(120); + expect(timeZone).notTo(beNil()); + expect(@(timeZone.gt_gitTimeOffset)).to(equal(@180)); }); }); @@ -55,4 +49,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTTreeBuilderSpec.m b/ObjectiveGitTests/GTTreeBuilderSpec.m index a1455340f..1308e130f 100644 --- a/ObjectiveGitTests/GTTreeBuilderSpec.m +++ b/ObjectiveGitTests/GTTreeBuilderSpec.m @@ -6,138 +6,137 @@ // Copyright (c) 2013 Johnnie Walker // -#import "GTTree.h" -#import "GTTreeEntry.h" -#import "GTTreeBuilder.h" -#import "GTRepository.h" -#import "GTBlob.h" -#import "git2.h" +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" static NSString * const testTreeSHA = @"c4dc1555e4d4fa0e0c9c3fc46734c7c35b3ce90b"; -SpecBegin(GTTreeBuilder) +QuickSpecBegin(GTTreeBuilderSpec) it(@"should be possible to make a new tree builder without a tree", ^{ NSError *error = nil; GTTreeBuilder *builder = [[GTTreeBuilder alloc] initWithTree:nil error:&error]; - expect(error).to.beNil(); - expect(builder).notTo.beNil(); + expect(error).to(beNil()); + expect(builder).notTo(beNil()); }); it(@"should be possible to make a new tree builder from an existing tree", ^{ NSError *error = nil; - + GTRepository *repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); - + expect(repo).notTo(beNil()); + GTTree *tree = (GTTree *)[repo lookUpObjectBySHA:testTreeSHA error:NULL]; - expect(tree).notTo.beNil(); - + expect(tree).notTo(beNil()); + GTTreeBuilder *builder = [[GTTreeBuilder alloc] initWithTree:tree error:&error]; - expect(error).to.beNil(); - expect(builder).notTo.beNil(); + expect(error).to(beNil()); + expect(builder).notTo(beNil()); }); describe(@"GTTreeBuilder building", ^{ __block GTTreeBuilder *builder; __block NSError *error = nil; __block GTOID *OID; - + beforeEach(^{ builder = [[GTTreeBuilder alloc] initWithTree:nil error:&error]; - expect(builder).notTo.beNil(); - expect(error).to.beNil(); + expect(builder).notTo(beNil()); + expect(error).to(beNil()); OID = [GTOID oidWithSHA:testTreeSHA]; }); - + it(@"should be possible to add an entry to a builder", ^{ GTTreeEntry *entry = [builder addEntryWithOID:OID fileName:@"tree" fileMode:GTFileModeTree error:&error]; - expect(entry).notTo.beNil(); - expect(error).to.beNil(); - - expect(builder.entryCount).to.equal(1); + expect(entry).notTo(beNil()); + expect(error).to(beNil()); + + expect(@(builder.entryCount)).to(equal(@1)); }); - + it(@"should be possible to remove an entry from a builder", ^{ NSString *fileName = @"tree"; GTTreeEntry *entry = [builder addEntryWithOID:OID fileName:fileName fileMode:GTFileModeTree error:&error]; - expect(entry).notTo.beNil(); - expect(error).to.beNil(); - - expect(builder.entryCount).to.equal(1); - + expect(entry).notTo(beNil()); + expect(error).to(beNil()); + + expect(@(builder.entryCount)).to(equal(@1)); + BOOL success = [builder removeEntryWithFileName:fileName error:&error]; - expect(success).to.beTruthy(); - expect(error).to.beNil(); - - expect(builder.entryCount).to.equal(0); + expect(@(success)).to(beTruthy()); + expect(error).to(beNil()); + + expect(@(builder.entryCount)).to(equal(@0)); }); - - it(@"should be possible to filter a builder", ^{ + + it(@"should be possible to filter a builder", ^{ GTRepository *repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); - + expect(repo).notTo(beNil()); + GTBlob *blob = [GTBlob blobWithString:@"Hi, how are you?" inRepository:repo error:&error]; - expect(blob).notTo.beNil(); - expect(error).to.beNil(); - + expect(blob).notTo(beNil()); + expect(error).to(beNil()); + [builder addEntryWithOID:blob.OID fileName:@"hi.txt" fileMode:GTFileModeBlob error:&error]; - - expect(builder.entryCount).to.equal(1); - + + expect(@(builder.entryCount)).to(equal(@1)); + [builder filter:^(const git_tree_entry *entry) { return YES; }]; - - expect(builder.entryCount).to.equal(0); + + expect(@(builder.entryCount)).to(equal(@0)); }); it(@"should be possible to find an entry by file name in a builder", ^{ NSString *fileName = @"tree"; GTTreeEntry *entry = [builder addEntryWithOID:OID fileName:fileName fileMode:GTFileModeTree error:&error]; - expect(entry).notTo.beNil(); - expect(error).to.beNil(); - + expect(entry).notTo(beNil()); + expect(error).to(beNil()); + GTTreeEntry *foundEntry = [builder entryWithFileName:fileName]; - expect(foundEntry.SHA).to.equal(entry.SHA); + expect(foundEntry.SHA).to(equal(entry.SHA)); }); it(@"should write new blobs when the tree is written", ^{ GTRepository *repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); + expect(repo).notTo(beNil()); GTTreeEntry *entry = [builder addEntryWithData:[@"Hello, World!" dataUsingEncoding:NSUTF8StringEncoding] fileName:@"test.txt" fileMode:GTFileModeBlob error:NULL]; - expect(entry).notTo.beNil(); + expect(entry).notTo(beNil()); GTObjectDatabase *database = [repo objectDatabaseWithError:NULL]; - expect(database).notTo.beNil(); + expect(database).notTo(beNil()); - expect([database containsObjectWithOID:entry.OID]).to.beFalsy(); + expect(@([database containsObjectWithOID:entry.OID])).to(beFalsy()); GTTree *tree = [builder writeTreeToRepository:repo error:NULL]; - expect(tree).notTo.beNil(); + expect(tree).notTo(beNil()); - expect([database containsObjectWithOID:entry.OID]).to.beTruthy(); + expect(@([database containsObjectWithOID:entry.OID])).to(beTruthy()); }); it(@"should be possible to write a builder to a repository", ^{ GTRepository *repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); - + expect(repo).notTo(beNil()); + GTBlob *blob = [GTBlob blobWithString:@"Hi, how are you?" inRepository:repo error:&error]; - expect(blob).notTo.beNil(); - expect(error).to.beNil(); - + expect(blob).notTo(beNil()); + expect(error).to(beNil()); + [builder addEntryWithOID:blob.OID fileName:@"hi.txt" fileMode:GTFileModeBlob error:&error]; - + GTTree *writtenTree = [builder writeTreeToRepository:repo error:&error]; - expect(writtenTree).notTo.beNil(); - expect(error).to.beNil(); - + expect(writtenTree).notTo(beNil()); + expect(error).to(beNil()); + GTTree *readTree = (GTTree *)[repo lookUpObjectBySHA:writtenTree.SHA objectType:GTObjectTypeTree error:&error]; - expect(readTree).notTo.beNil(); - expect(error).to.beNil(); + expect(readTree).notTo(beNil()); + expect(error).to(beNil()); }); }); @@ -145,4 +144,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/GTTreeSpec.m b/ObjectiveGitTests/GTTreeSpec.m index 83a7c22d8..05d1e5677 100644 --- a/ObjectiveGitTests/GTTreeSpec.m +++ b/ObjectiveGitTests/GTTreeSpec.m @@ -6,48 +6,51 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTTree.h" -#import "GTTreeEntry.h" +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" static NSString * const testTreeSHA = @"c4dc1555e4d4fa0e0c9c3fc46734c7c35b3ce90b"; -SpecBegin(GTTree) +QuickSpecBegin(GTTreeSpec) __block GTTree *tree; beforeEach(^{ GTRepository *repo = self.bareFixtureRepository; - expect(repo).notTo.beNil(); + expect(repo).notTo(beNil()); tree = (GTTree *)[repo lookUpObjectBySHA:testTreeSHA error:NULL]; - expect(tree).notTo.beNil(); + expect(tree).notTo(beNil()); }); it(@"should be able to read tree properties", ^{ - expect(tree.SHA).to.equal(testTreeSHA); - expect(tree.entryCount).to.equal(3); + expect(tree.SHA).to(equal(testTreeSHA)); + expect(@(tree.entryCount)).to(equal(@3)); }); it(@"should be able to read tree entry properties", ^{ GTTreeEntry *entry = [tree entryAtIndex:0]; - expect(entry).notTo.beNil(); - expect(entry.name).to.equal(@"README"); - expect(entry.SHA).to.equal(@"1385f264afb75a56a5bec74243be9b367ba4ca08"); + expect(entry).notTo(beNil()); + expect(entry.name).to(equal(@"README")); + expect(entry.SHA).to(equal(@"1385f264afb75a56a5bec74243be9b367ba4ca08")); }); it(@"should give quick access to its entries", ^{ NSArray *treeEntries = tree.entries; - expect(treeEntries).notTo.beNil(); - expect(treeEntries.count).to.equal(3); + expect(treeEntries).notTo(beNil()); + expect(@(treeEntries.count)).to(equal(@3)); GTTreeEntry *readme = [tree entryWithName:@"README"]; GTTreeEntry *newTxt = [tree entryWithName:@"new.txt"]; GTTreeEntry *subdir = [tree entryWithName:@"subdir"]; - expect(readme).notTo.beNil(); - expect(newTxt).notTo.beNil(); - expect(subdir).notTo.beNil(); - expect(treeEntries).to.contain(readme); - expect(treeEntries).to.contain(newTxt); - expect(treeEntries).to.contain(subdir); + expect(readme).notTo(beNil()); + expect(newTxt).notTo(beNil()); + expect(subdir).notTo(beNil()); + expect(treeEntries).to(contain(readme)); + expect(treeEntries).to(contain(newTxt)); + expect(treeEntries).to(contain(subdir)); }); describe(@"tree enumeration", ^{ @@ -61,8 +64,8 @@ return YES; }]; - expect(success).to.beTruthy(); - expect(mutableArray.count).to.equal(1); + expect(@(success)).to(beTruthy()); + expect(@(mutableArray.count)).to(equal(@1)); }); it(@"should be able to enumerate descendants", ^{ @@ -73,11 +76,11 @@ } return YES; }]; - - expect(success).to.beTruthy; - expect(entriesInASubtree.count).to.equal(5); + + expect(@(success)).to(beTruthy()); + expect(@(entriesInASubtree.count)).to(equal(@5)); }); - + it(@"should be able to enumerate in post-order", ^{ NSMutableArray *entries = [NSMutableArray array]; BOOL success = [tree enumerateEntriesWithOptions:GTTreeEnumerationOptionPost error:nil block:^(GTTreeEntry *entry, NSString *root, BOOL *stop) { @@ -85,19 +88,19 @@ // Because we are enumerating in post-order the return statement has no impact. return NO; }]; - - expect(success).to.beTruthy(); - expect(entries.count).to.equal(8); + + expect(@(success)).to(beTruthy()); + expect(@(entries.count)).to(equal(@8)); }); }); it(@"should return nil for non-existent entries", ^{ - expect([tree entryAtIndex:99]).to.beNil(); - expect([tree entryWithName:@"_does not exist"]).to.beNil(); + expect([tree entryAtIndex:99]).to(beNil()); + expect([tree entryWithName:@"_does not exist"]).to(beNil()); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/Info.plist b/ObjectiveGitTests/Info.plist new file mode 100644 index 000000000..a058904a5 --- /dev/null +++ b/ObjectiveGitTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.libgit2.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/ObjectiveGitTests/NSArray+StringArraySpec.m b/ObjectiveGitTests/NSArray+StringArraySpec.m index 60fc88545..6a2e903ec 100644 --- a/ObjectiveGitTests/NSArray+StringArraySpec.m +++ b/ObjectiveGitTests/NSArray+StringArraySpec.m @@ -6,17 +6,23 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -SpecBegin(StringArray) +#import +#import +#import + +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(StringArray) describe(@"String arrays", ^{ void (^validateStrArray)(NSArray *, git_strarray) = ^(NSArray *array, git_strarray strArray) { - expect(strArray.count).to.equal(array.count); + expect(@(strArray.count)).to(equal(@(array.count))); for (NSUInteger idx = 0; idx < array.count; idx++) { const char *convertedString = strArray.strings[idx]; NSString *comparisonString = @(convertedString); - expect(array[idx]).to.equal(comparisonString); + expect(array[idx]).to(equal(comparisonString)); } }; @@ -35,8 +41,8 @@ it(@"should return null for an empty array", ^{ NSArray *emptyArray = [NSArray array]; - expect(emptyArray.git_strarray.count).to.equal(0); - expect(emptyArray.git_strarray.strings).to.beNil(); + expect(@(emptyArray.git_strarray.count)).to(equal(@0)); + expect([NSValue valueWithPointer:emptyArray.git_strarray.strings]).to(equal([NSValue valueWithPointer:NULL])); }); it(@"should correctly translate the strings", ^{ @@ -78,7 +84,7 @@ it(@"should return an empty array for an NULL strarray", ^{ git_strarray strarray = { .strings = NULL, .count = 0 }; NSArray *array = [NSArray git_arrayWithStrarray:strarray]; - expect(array.count).to.equal(0); + expect(@(array.count)).to(equal(@0)); }); it(@"should correctly translate the strarray", ^{ @@ -90,7 +96,7 @@ originalStrArray.strings[1] = NULL; NSArray *array = [NSArray git_arrayWithStrarray:originalStrArray]; - expect(array).to.equal((@[ @"First", @"Third" ])); + expect(array).to(equal((@[ @"First", @"Third" ]))); }); }); }); @@ -99,4 +105,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/NSDataGitSpec.m b/ObjectiveGitTests/NSDataGitSpec.m index 58e628388..bc3c4fe37 100644 --- a/ObjectiveGitTests/NSDataGitSpec.m +++ b/ObjectiveGitTests/NSDataGitSpec.m @@ -6,9 +6,13 @@ // Copyright (c) 2014 GitHub, Inc. All rights reserved. // -#import "NSData+Git.h" +#import +#import +#import -SpecBegin(NSDataGit) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(NSDataGit) const void *testData = "hello world"; const size_t testDataSize = strlen(testData) + 1; @@ -18,12 +22,12 @@ beforeEach(^{ buffer = (git_buf)GIT_BUF_INIT_CONST(NULL, 0); - expect(git_buf_set(&buffer, testData, testDataSize)).to.equal(GIT_OK); + expect(@(git_buf_set(&buffer, testData, testDataSize))).to(equal(@(GIT_OK))); - expect(buffer.ptr).notTo.beNil(); - expect(buffer.ptr).notTo.equal(testData); - expect(buffer.size).to.equal(testDataSize); - expect(buffer.asize).to.beGreaterThanOrEqualTo(testDataSize); + expect([NSValue valueWithPointer:buffer.ptr]).notTo(equal([NSValue valueWithPointer:NULL])); + expect([NSValue valueWithPointer:buffer.ptr]).notTo(equal([NSValue valueWithPointer:testData])); + expect(@(buffer.size)).to(equal(@(testDataSize))); + expect(@(buffer.asize)).to(beGreaterThanOrEqualTo(@(testDataSize))); }); afterEach(^{ @@ -32,34 +36,34 @@ it(@"should create matching NSData", ^{ NSData *data = [NSData git_dataWithBuffer:&buffer]; - expect(data).notTo.beNil(); + expect(data).notTo(beNil()); - expect(data.length).to.equal(testDataSize); - expect(memcmp(data.bytes, testData, testDataSize)).to.equal(0); + expect(@(data.length)).to(equal(@(testDataSize))); + expect(@(memcmp(data.bytes, testData, testDataSize))).to(equal(@0)); }); it(@"should invalidate the buffer", ^{ [NSData git_dataWithBuffer:&buffer]; - expect(buffer.size).to.equal(0); - expect(buffer.asize).to.equal(0); - expect(buffer.ptr).to.beNil(); + expect(@(buffer.size)).to(equal(@0)); + expect(@(buffer.asize)).to(equal(@0)); + expect([NSValue valueWithPointer:buffer.ptr]).to(equal([NSValue valueWithPointer:NULL])); }); }); describe(@"git_buf", ^{ __block NSData *data; - + beforeEach(^{ data = [NSData dataWithBytes:testData length:testDataSize]; - expect(data).notTo.beNil(); + expect(data).notTo(beNil()); }); it(@"should return a constant buffer of the data's bytes", ^{ git_buf buffer = data.git_buf; - expect(buffer.ptr).to.equal(data.bytes); - expect(buffer.size).to.equal(data.length); - expect(buffer.asize).to.equal(0); + expect([NSValue valueWithPointer:buffer.ptr]).to(equal([NSValue valueWithPointer:data.bytes])); + expect(@(buffer.size)).to(equal(@(data.length))); + expect(@(buffer.asize)).to(equal(@0)); }); }); @@ -67,4 +71,4 @@ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/NSErrorGitSpec.m b/ObjectiveGitTests/NSErrorGitSpec.m index b9de73229..faa611796 100644 --- a/ObjectiveGitTests/NSErrorGitSpec.m +++ b/ObjectiveGitTests/NSErrorGitSpec.m @@ -6,54 +6,58 @@ // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "NSError+Git.h" +#import +#import +#import -SpecBegin(NSErrorGit) +#import "QuickSpec+GTFixtures.h" + +QuickSpecBegin(NSErrorGit) it(@"should create an error with a nil description", ^{ NSError *error = [NSError git_errorFor:GIT_OK description:nil]; - expect(error).notTo.beNil(); + expect(error).notTo(beNil()); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_OK); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_OK))); // Test the keys because NSError adds its own defaults sometimes. - expect(error.userInfo[NSLocalizedDescriptionKey]).to.beNil(); - expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to.beNil(); + expect(error.userInfo[NSLocalizedDescriptionKey]).to(beNil()); + expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to(beNil()); }); it(@"should create an error with a formatted description", ^{ NSError *error = [NSError git_errorFor:GIT_OK description:@"foo %@ bar %@", @1, @"buzz"]; - expect(error).notTo.beNil(); + expect(error).notTo(beNil()); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_OK); - expect(error.userInfo[NSLocalizedDescriptionKey]).to.equal(@"foo 1 bar buzz"); - expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to.beNil(); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_OK))); + expect(error.userInfo[NSLocalizedDescriptionKey]).to(equal(@"foo 1 bar buzz")); + expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to(beNil()); }); it(@"should create an error with a nil description and failure reason", ^{ NSError *error = [NSError git_errorFor:GIT_OK description:nil failureReason:nil]; - expect(error).notTo.beNil(); + expect(error).notTo(beNil()); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_OK); - expect(error.userInfo[NSLocalizedDescriptionKey]).to.beNil(); - expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to.beNil(); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_OK))); + expect(error.userInfo[NSLocalizedDescriptionKey]).to(beNil()); + expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to(beNil()); }); it(@"should create an error with a formatted failure reason", ^{ NSError *error = [NSError git_errorFor:GIT_OK description:@"foobar" failureReason:@"foo %@ bar %@", @1, @"buzz"]; - expect(error).notTo.beNil(); + expect(error).notTo(beNil()); - expect(error.domain).to.equal(GTGitErrorDomain); - expect(error.code).to.equal(GIT_OK); - expect(error.userInfo[NSLocalizedDescriptionKey]).to.equal(@"foobar"); - expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to.equal(@"foo 1 bar buzz"); + expect(error.domain).to(equal(GTGitErrorDomain)); + expect(@(error.code)).to(equal(@(GIT_OK))); + expect(error.userInfo[NSLocalizedDescriptionKey]).to(equal(@"foobar")); + expect(error.userInfo[NSLocalizedFailureReasonErrorKey]).to(equal(@"foo 1 bar buzz")); }); afterEach(^{ [self tearDown]; }); -SpecEnd +QuickSpecEnd diff --git a/ObjectiveGitTests/ObjectiveGitTests-Prefix.pch b/ObjectiveGitTests/ObjectiveGitTests-Prefix.pch deleted file mode 100644 index 878da011b..000000000 --- a/ObjectiveGitTests/ObjectiveGitTests-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'ObjectiveGitTests' target in the 'ObjectiveGitTests' project -// - -#ifdef __OBJC__ - #import - #import - #import - - #import "GTTestCase.h" - - #define EXP_SHORTHAND - #import "Expecta.h" -#endif diff --git a/ObjectiveGitTests/GTTestCase.h b/ObjectiveGitTests/QuickSpec+GTFixtures.h similarity index 79% rename from ObjectiveGitTests/GTTestCase.h rename to ObjectiveGitTests/QuickSpec+GTFixtures.h index 9a49bae1e..c2a2e5dc3 100644 --- a/ObjectiveGitTests/GTTestCase.h +++ b/ObjectiveGitTests/QuickSpec+GTFixtures.h @@ -1,17 +1,19 @@ // -// GTTestCase.h +// QuickSpec+GTFixtures.h // ObjectiveGitFramework // // Created by Josh Abernathy on 3/22/13. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#define SPT_SUBCLASS GTTestCase -#import "Specta.h" +#import @class GTRepository; -@interface GTTestCase : SPTXCTestCase +// FIXME: This category is a total hack, but there's no other way to run +// teardown logic for every example yet: +// https://github.com/Quick/Quick/issues/163 +@interface QuickSpec (GTFixtures) // The file URL for a temporary directory which will live for the length of each // example (`it`). diff --git a/ObjectiveGitTests/GTTestCase.m b/ObjectiveGitTests/QuickSpec+GTFixtures.m similarity index 82% rename from ObjectiveGitTests/GTTestCase.m rename to ObjectiveGitTests/QuickSpec+GTFixtures.m index 7cd0e4fb6..24140233c 100644 --- a/ObjectiveGitTests/GTTestCase.m +++ b/ObjectiveGitTests/QuickSpec+GTFixtures.m @@ -1,26 +1,50 @@ // -// GTTestCase.m +// QuickSpec+GTFixtures.m // ObjectiveGitFramework // // Created by Josh Abernathy on 3/22/13. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // -#import "GTTestCase.h" -#import "GTRepository.h" +#import "QuickSpec+GTFixtures.h" -#import "SPTSpec.h" +#import +#import -static const NSInteger GTTestCaseErrorUnzipFailed = 666; +static const NSInteger FixturesErrorUnzipFailed = 666; -static NSString * const GTTestCaseErrorDomain = @"com.objectivegit.GTTestCase"; +static NSString * const FixturesErrorDomain = @"com.objectivegit.Fixtures"; + +@interface QuickSpec (Fixtures) -@interface GTTestCase () @property (nonatomic, readonly, copy) NSString *repositoryFixturesPath; @property (nonatomic, copy) NSString *tempDirectoryPath; + @end -@implementation GTTestCase +@implementation QuickSpec (Fixtures) + +#pragma mark Properties + +- (NSString *)tempDirectoryPath { + NSString *path = objc_getAssociatedObject(self, _cmd); + if (path != nil) return path; + + [self setUpTempDirectoryPath]; + return objc_getAssociatedObject(self, _cmd); +} + +- (void)setTempDirectoryPath:(NSString *)path { + objc_setAssociatedObject(self, @selector(tempDirectoryPath), path, OBJC_ASSOCIATION_COPY); +} + +- (NSURL *)tempDirectoryFileURL { + return [NSURL fileURLWithPath:self.tempDirectoryPath isDirectory:YES]; +} + +- (NSString *)repositoryFixturesPath { + return [self.tempDirectoryPath stringByAppendingPathComponent:@"repositories"]; +} #pragma mark Setup/Teardown @@ -34,14 +58,13 @@ - (void)cleanUp { NSString *path = self.tempDirectoryPath; if (path == nil) return; - expect([NSFileManager.defaultManager removeItemAtPath:path error:NULL]).to.beTruthy(); - + [NSFileManager.defaultManager removeItemAtPath:path error:NULL]; self.tempDirectoryPath = nil; } #pragma mark Fixtures -- (void)setupTempDirectoryPath { +- (void)setUpTempDirectoryPath { self.tempDirectoryPath = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"com.libgit2.objectivegit"] stringByAppendingPathComponent:NSProcessInfo.processInfo.globallyUniqueString]; NSError *error = nil; @@ -82,7 +105,7 @@ - (BOOL)unzipFile:(NSString *)member fromArchiveAtPath:(NSString *)zipPath intoD BOOL success = (task.terminationStatus == 0); if (!success) { - if (error != NULL) *error = [NSError errorWithDomain:GTTestCaseErrorDomain code:GTTestCaseErrorUnzipFailed userInfo:@{ NSLocalizedDescriptionKey: NSLocalizedString(@"Unzip failed", @"") }]; + if (error != NULL) *error = [NSError errorWithDomain:FixturesErrorDomain code:FixturesErrorUnzipFailed userInfo:@{ NSLocalizedDescriptionKey: NSLocalizedString(@"Unzip failed", @"") }]; } return success; @@ -138,20 +161,4 @@ - (NSBundle *)mainTestBundle { return [NSBundle bundleForClass:self.class]; } -- (NSString *)tempDirectoryPath { - if (_tempDirectoryPath == nil) { - [self setupTempDirectoryPath]; - } - - return _tempDirectoryPath; -} - -- (NSURL *)tempDirectoryFileURL { - return [NSURL fileURLWithPath:self.tempDirectoryPath isDirectory:YES]; -} - -- (NSString *)repositoryFixturesPath { - return [self.tempDirectoryPath stringByAppendingPathComponent:@"repositories"]; -} - @end diff --git a/ObjectiveGitTests/SwiftSpec.swift b/ObjectiveGitTests/SwiftSpec.swift new file mode 100644 index 000000000..46b8aaa00 --- /dev/null +++ b/ObjectiveGitTests/SwiftSpec.swift @@ -0,0 +1,19 @@ +// +// SwiftSpec.swift +// Archimedes +// +// Created by Justin Spahr-Summers on 2014-10-02. +// Copyright (c) 2014 GitHub. All rights reserved. +// + +import Foundation +import Nimble +import Quick + +// Without this, the Swift stdlib won't be linked into the test target (even if +// “Embedded Content Contains Swift Code” is enabled). +class SwiftSpec: QuickSpec { + override func spec() { + expect(true).to(beTruthy()) + } +} diff --git a/ObjectiveGitTests/en.lproj/InfoPlist.strings b/ObjectiveGitTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8..000000000 --- a/ObjectiveGitTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/ObjectiveGitTests/expecta b/ObjectiveGitTests/expecta deleted file mode 160000 index 9a124336f..000000000 --- a/ObjectiveGitTests/expecta +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9a124336f3d7ecac9f00a5313b42cd480bc8a0d5 diff --git a/ObjectiveGitTests/specta b/ObjectiveGitTests/specta deleted file mode 160000 index 6eef3072d..000000000 --- a/ObjectiveGitTests/specta +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6eef3072d96a583438f12e379cdd62add9cd7ce6 diff --git a/script/bootstrap b/script/bootstrap index 31deaf40f..fa19a6001 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -10,7 +10,7 @@ config () { # A whitespace-separated list of executables that must be present and locatable. : ${REQUIRED_TOOLS="xctool cmake"} - + export REQUIRED_TOOLS } @@ -28,7 +28,14 @@ main () check_deps fi - local submodules=$(git submodule status 2>/dev/null) + local submodules=$(git submodule status) + local result=$? + + if [ "$result" -ne "0" ] + then + exit $result + fi + if [ -n "$submodules" ] then echo "*** Updating submodules..." diff --git a/script/cibuild b/script/cibuild index f73430352..fa57412ab 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,7 +1,6 @@ #!/bin/bash export SCRIPT_DIR=$(dirname "$0") -. "$SCRIPT_DIR/xcode_functions.sh" ## ## Configuration Variables @@ -40,8 +39,8 @@ config () # A whitespace-separated list of default schemes to build. # # Individual names can be quoted to avoid word splitting. - : ${SCHEMES:=ObjectiveGit ObjectiveGit-iOS} - + : ${SCHEMES:=$(xcodebuild -list -project "$XCODEPROJ" 2>/dev/null | awk -f "$SCRIPT_DIR/schemes.awk")} + export XCWORKSPACE export XCODEPROJ export BOOTSTRAP @@ -121,16 +120,27 @@ build_scheme () local awkstatus=$? - if [ "$awkstatus" -ne "0" ] + if [ "$awkstatus" -eq "1" ] then - # Unit tests aren't supported. - action=build + # SDK not found, try for iphonesimulator. + sdkflag="-sdk iphonesimulator" + + # Determine whether the unit tests will run with iphonesimulator + run_xctool $sdkflag -scheme "$scheme" run-tests | parse_build + + awkstatus=$? + + if [ "$awkstatus" -ne "0" ] + then + # Unit tests will not run on iphonesimulator. + sdkflag="" + fi fi - if [ "$awkstatus" -eq "1" ] + if [ "$awkstatus" -ne "0" ] then - # Build for iOS. - sdkflag="-sdk iphonesimulator" + # Unit tests aren't supported. + action=build fi run_xctool $sdkflag -scheme "$scheme" $action diff --git a/script/schemes.awk b/script/schemes.awk index d101b4fd3..4c94df914 100644 --- a/script/schemes.awk +++ b/script/schemes.awk @@ -2,10 +2,8 @@ BEGIN { FS = "\n"; } -/Targets:/ { +/Schemes:/ { while (getline && $0 != "") { - if ($0 ~ /Test/) continue; - sub(/^ +/, ""); print "'" $0 "'"; } diff --git a/script/update_libgit2_ios b/script/update_libgit2_ios index 2721a0b17..dfebd3bbd 100755 --- a/script/update_libgit2_ios +++ b/script/update_libgit2_ios @@ -8,7 +8,7 @@ source "${SCRIPT_DIR}/ios_build_functions.sh" function setup () { - if [ "${ROOT_PATH}/External/libgit2-ios.a" -nt "${ROOT_PATH}/External/libgit2" ] + if [ "${ROOT_PATH}/External/libgit2-ios/libgit2-ios.a" -nt "${ROOT_PATH}/External/libgit2" ] then echo "No update needed." exit 0 @@ -68,7 +68,7 @@ function fat_binary () { echo "Building fat binary..." - lipo -create "${BUILT_LIB_PATHS[@]}" -output "${ROOT_PATH}/External/libgit2-ios.a" + lipo -create "${BUILT_LIB_PATHS[@]}" -output "${ROOT_PATH}/External/libgit2-ios/libgit2-ios.a" echo "Building done." diff --git a/script/update_libssl_ios b/script/update_libssl_ios index cf8eaff36..3d3a209dc 100755 --- a/script/update_libssl_ios +++ b/script/update_libssl_ios @@ -1,7 +1,5 @@ #!/bin/bash -set -e - # source the common build functions SCRIPT_DIR=$(dirname "$0") source "${SCRIPT_DIR}/ios_build_functions.sh" @@ -49,7 +47,7 @@ function build_ssl () perl -i -pe "s|^CFLAG= (.*)|CFLAG= -isysroot ${SDKROOT} \$1|g" Makefile >> "${LOG}" 2>&1 make >> "${LOG}" 2>&1 - make install >> "${LOG}" 2>&1 + make install_sw >> "${LOG}" 2>&1 popd > /dev/null rm -rf "/tmp/openssl"