From d930a5bbbc047a77c8731c7460e991ebb544783e Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:15:22 -0500 Subject: [PATCH 01/16] Update osx_image to xcode7 in .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2e8d266d3..d0658a5ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode6.4 +osx_image: xcode7 language: objective-c install: script/bootstrap script: script/cibuild From 5e7801d41ccf1ca39ab540a5688874f755cb138e Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:16:49 -0500 Subject: [PATCH 02/16] GTBlame typed collections --- ObjectiveGit/GTBlame.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveGit/GTBlame.h b/ObjectiveGit/GTBlame.h index e5bd396de..22668133d 100644 --- a/ObjectiveGit/GTBlame.h +++ b/ObjectiveGit/GTBlame.h @@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable instancetype)initWithGitBlame:(git_blame *)blame NS_DESIGNATED_INITIALIZER; /// Get all the hunks in the blame. A convenience wrapper around `enumerateHunksUsingBlock:` -@property (nonatomic, strong, readonly) NSArray *hunks; +@property (nonatomic, strong, readonly) NSArray *hunks; /// The number of hunks in the blame. @property (nonatomic, readonly) NSUInteger hunkCount; From 030c0d334a29cb69c70cf3bc7fb6076d4416623e Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:17:09 -0500 Subject: [PATCH 03/16] GTBranch typed collections --- ObjectiveGit/GTBranch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveGit/GTBranch.h b/ObjectiveGit/GTBranch.h index 7a5155a8c..4a8766357 100644 --- a/ObjectiveGit/GTBranch.h +++ b/ObjectiveGit/GTBranch.h @@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN /// error - If not NULL, set to any error that occurs. /// /// Returns a (possibly empty) array of GTCommits, or nil if an error occurs. -- (nullable NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error; +- (nullable NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error; /// Deletes the local branch and nils out the reference. - (BOOL)deleteWithError:(NSError **)error; From 0baccf4c7ce5a59cc6b8d82c2d8dafc028e7d4c2 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:17:22 -0500 Subject: [PATCH 04/16] GTCommit typed collections --- ObjectiveGit/GTCommit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveGit/GTCommit.h b/ObjectiveGit/GTCommit.h index 23cdfc2f1..d721bf9ee 100644 --- a/ObjectiveGit/GTCommit.h +++ b/ObjectiveGit/GTCommit.h @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly, strong, nullable) GTSignature *author; @property (nonatomic, readonly, strong, nullable) GTSignature *committer; -@property (nonatomic, readonly, copy) NSArray *parents; +@property (nonatomic, readonly, copy) NSArray *parents; @property (nonatomic, readonly, nullable) NSString *message; @property (nonatomic, readonly) NSString *messageDetails; @property (nonatomic, readonly) NSString *messageSummary; From 36618fff3871377e37605ea2d6db9ec9f07e53d8 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:17:33 -0500 Subject: [PATCH 05/16] GTConfiguration typed collections --- ObjectiveGit/GTConfiguration.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ObjectiveGit/GTConfiguration.h b/ObjectiveGit/GTConfiguration.h index f9346fe63..1e67030c1 100644 --- a/ObjectiveGit/GTConfiguration.h +++ b/ObjectiveGit/GTConfiguration.h @@ -9,6 +9,7 @@ #import #import "git2/types.h" +@class GTRemote; @class GTRepository; @class GTSignature; @@ -17,11 +18,11 @@ NS_ASSUME_NONNULL_BEGIN @interface GTConfiguration : NSObject @property (nonatomic, readonly, strong, nullable) GTRepository *repository; -@property (nonatomic, readonly, copy) NSArray *configurationKeys; +@property (nonatomic, readonly, copy) NSArray *configurationKeys; /// The GTRemotes in the config. If the configuration isn't associated with any /// repository, this will always be nil. -@property (nonatomic, readonly, copy, nullable) NSArray *remotes; +@property (nonatomic, readonly, copy, nullable) NSArray *remotes; - (instancetype)init NS_UNAVAILABLE; From 16e404ff294dc30e6b23e070ca622ce71d47ec77 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:18:11 -0500 Subject: [PATCH 06/16] GTEnumerator typed collections --- ObjectiveGit/GTEnumerator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveGit/GTEnumerator.h b/ObjectiveGit/GTEnumerator.h index aee9b3af2..d3d9d60c2 100644 --- a/ObjectiveGit/GTEnumerator.h +++ b/ObjectiveGit/GTEnumerator.h @@ -115,7 +115,7 @@ NS_ASSUME_NONNULL_BEGIN /// error - If not NULL, set to any error that occurs during traversal. /// /// Returns a (possibly empty) array of GTCommits, or nil if an error occurs. -- (nullable NSArray *)allObjectsWithError:(NSError **)error; +- (nullable NSArray *)allObjectsWithError:(NSError **)error; /// Gets the next commit. /// From 25490c0165f1d9170648b1689fc04cbf2066c0e8 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:18:23 -0500 Subject: [PATCH 07/16] GTIndex typed collections --- ObjectiveGit/GTIndex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObjectiveGit/GTIndex.h b/ObjectiveGit/GTIndex.h index 2c226f87a..35bdaefae 100644 --- a/ObjectiveGit/GTIndex.h +++ b/ObjectiveGit/GTIndex.h @@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) NSUInteger entryCount; /// The GTIndexEntries in the index. -@property (nonatomic, readonly, copy) NSArray *entries; +@property (nonatomic, readonly, copy) NSArray *entries; /// Whether the index contains conflicted files. @property (nonatomic, readonly) BOOL hasConflicts; @@ -220,7 +220,7 @@ NS_ASSUME_NONNULL_BEGIN /// error - When something goes wrong, this parameter is set. Optional. /// /// Returns `YES` in the event that everything has gone smoothly. Otherwise, `NO`. -- (BOOL)updatePathspecs:(nullable NSArray *)pathspecs error:(NSError **)error passingTest:(nullable BOOL (^)(NSString *matchedPathspec, NSString *path, BOOL *stop))block; +- (BOOL)updatePathspecs:(nullable NSArray *)pathspecs error:(NSError **)error passingTest:(nullable BOOL (^)(NSString *matchedPathspec, NSString *path, BOOL *stop))block; #pragma mark Deprecations - (nullable GTIndexEntry *)entryWithName:(NSString *)name __deprecated_msg("use entryWithPath: instead."); From 6e5cb505e9200364b070118d0b5a0e693c125915 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:18:31 -0500 Subject: [PATCH 08/16] GTRemote typed collections --- ObjectiveGit/GTRemote.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ObjectiveGit/GTRemote.h b/ObjectiveGit/GTRemote.h index a80ed3eb2..7b6b9f828 100644 --- a/ObjectiveGit/GTRemote.h +++ b/ObjectiveGit/GTRemote.h @@ -56,13 +56,13 @@ typedef enum { /// /// This array will contain NSStrings of the form /// `+refs/heads/*:refs/remotes/REMOTE/*`. -@property (nonatomic, readonly, copy, nullable) NSArray *fetchRefspecs; +@property (nonatomic, readonly, copy, nullable) NSArray *fetchRefspecs; /// The push refspecs for this remote. /// /// This array will contain NSStrings of the form /// `+refs/heads/*:refs/remotes/REMOTE/*`. -@property (nonatomic, readonly, copy, nullable) NSArray *pushRefspecs; +@property (nonatomic, readonly, copy, nullable) NSArray *pushRefspecs; /// Tests if a name is valid + (BOOL)isValidRemoteName:(NSString *)name; From 3fd3b21a73ce22cf6d68a3de19e329a6f8e8a353 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:19:05 -0500 Subject: [PATCH 09/16] GTRepository typed collections --- ObjectiveGit/GTRepository+Committing.h | 4 ++-- ObjectiveGit/GTRepository+RemoteOperations.h | 4 ++-- ObjectiveGit/GTRepository+Reset.h | 2 +- ObjectiveGit/GTRepository.h | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ObjectiveGit/GTRepository+Committing.h b/ObjectiveGit/GTRepository+Committing.h index fd4d1d23b..e77ee2115 100644 --- a/ObjectiveGit/GTRepository+Committing.h +++ b/ObjectiveGit/GTRepository+Committing.h @@ -25,11 +25,11 @@ NS_ASSUME_NONNULL_BEGIN /// error - The error if one occurred. /// /// Returns the newly created commit, or nil if an error occurred. -- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message author:(GTSignature *)author committer:(GTSignature *)committer parents:(nullable NSArray *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error; +- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message author:(GTSignature *)author committer:(GTSignature *)committer parents:(nullable NSArray *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error; /// Creates a new commit using +createCommitWithTree:message:author:committer:parents:updatingReferenceNamed:error: /// with -userSignatureForNow as both the author and committer. -- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message parents:(nullable NSArray *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error; +- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message parents:(nullable NSArray *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error; @end diff --git a/ObjectiveGit/GTRepository+RemoteOperations.h b/ObjectiveGit/GTRepository+RemoteOperations.h index 33f22b13c..5afe6d2d1 100644 --- a/ObjectiveGit/GTRepository+RemoteOperations.h +++ b/ObjectiveGit/GTRepository+RemoteOperations.h @@ -48,7 +48,7 @@ extern NSString *const GTRepositoryRemoteOptionsCredentialProvider; /// error - The error if one ocurred. Can be NULL. /// /// Retruns a (possibly empty) array with GTFetchHeadEntry objects. Will not be nil. -- (NSArray *)fetchHeadEntriesWithError:(NSError **)error; +- (NSArray *)fetchHeadEntriesWithError:(NSError **)error; #pragma mark - Push @@ -78,7 +78,7 @@ extern NSString *const GTRepositoryRemoteOptionsCredentialProvider; /// /// Returns YES if the push was successful, NO otherwise (and `error`, if provided, /// will point to an error describing what happened). -- (BOOL)pushBranches:(NSArray *)branches toRemote:(GTRemote *)remote withOptions:(nullable NSDictionary *)options error:(NSError **)error progress:(nullable void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock; +- (BOOL)pushBranches:(NSArray *)branches toRemote:(GTRemote *)remote withOptions:(nullable NSDictionary *)options error:(NSError **)error progress:(nullable void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock; /// Delete a remote branch /// diff --git a/ObjectiveGit/GTRepository+Reset.h b/ObjectiveGit/GTRepository+Reset.h index fc47b39ca..cbb06158a 100644 --- a/ObjectiveGit/GTRepository+Reset.h +++ b/ObjectiveGit/GTRepository+Reset.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN /// error - The error if one occurred. /// /// Returns whether the reset was successful. -- (BOOL)resetPathspecs:(NSArray *)pathspecs toCommit:(GTCommit *)commit error:(NSError **)error; +- (BOOL)resetPathspecs:(NSArray *)pathspecs toCommit:(GTCommit *)commit error:(NSError **)error; @end diff --git a/ObjectiveGit/GTRepository.h b/ObjectiveGit/GTRepository.h index ceb8337d9..48733ed2e 100644 --- a/ObjectiveGit/GTRepository.h +++ b/ObjectiveGit/GTRepository.h @@ -260,7 +260,7 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString; /// /// returns an array of NSStrings holding the names of the references /// returns nil if an error occurred and fills the error parameter -- (nullable NSArray *)referenceNamesWithError:(NSError **)error; +- (nullable NSArray *)referenceNamesWithError:(NSError **)error; /// Get the HEAD reference. /// @@ -274,14 +274,14 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString; /// error - If not NULL, set to any error that occurs. /// /// Returns an array of GTBranches or nil if an error occurs. -- (nullable NSArray *)localBranchesWithError:(NSError **)error; +- (nullable NSArray *)localBranchesWithError:(NSError **)error; /// Get the remote branches. /// /// error - If not NULL, set to any error that occurs. /// /// Returns an array of GTBranches or nil if an error occurs. -- (nullable NSArray *)remoteBranchesWithError:(NSError **)error; +- (nullable NSArray *)remoteBranchesWithError:(NSError **)error; /// Get branches with names sharing a given prefix. /// @@ -289,7 +289,7 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString; /// error - If not NULL, set to any error that occurs. /// /// Returns an array of GTBranches or nil if an error occurs. -- (nullable NSArray *)branchesWithPrefix:(NSString *)prefix error:(NSError **)error; +- (nullable NSArray *)branchesWithPrefix:(NSString *)prefix error:(NSError **)error; /// Get the local and remote branches and merge them together by combining local /// branches with their remote branch, if they have one. @@ -297,21 +297,21 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString; /// error - If not NULL, set to any error that occurs. /// /// Returns an array of GTBranches or nil if an error occurs. -- (nullable NSArray *)branches:(NSError **)error; +- (nullable NSArray *)branches:(NSError **)error; /// List all remotes in the repository /// /// error - will be filled if an error occurs /// /// returns an array of NSStrings holding the names of the remotes, or nil if an error occurred -- (nullable NSArray *)remoteNamesWithError:(NSError **)error; +- (nullable NSArray *)remoteNamesWithError:(NSError **)error; /// Get all tags in the repository. /// /// error - If not NULL, set to any error that occurs. /// /// Returns an array of GTTag or nil if an error occurs. -- (nullable NSArray *)allTagsWithError:(NSError **)error; +- (nullable NSArray *)allTagsWithError:(NSError **)error; /// Count all commits in the current branch (HEAD) /// @@ -367,7 +367,7 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString; /// error(out) - will be filled if an error occurs /// /// returns the local commits, an empty array if there is no remote branch, or nil if an error occurred -- (nullable NSArray *)localCommitsRelativeToRemoteBranch:(GTBranch *)remoteBranch error:(NSError **)error; +- (nullable NSArray *)localCommitsRelativeToRemoteBranch:(GTBranch *)remoteBranch error:(NSError **)error; /// Retrieves git's "prepared message" for the next commit, like the default /// message pre-filled when committing after a conflicting merge. From 87b82c226f2a7ce99b2eaa9b751c859b16ac117c Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Fri, 28 Aug 2015 01:19:15 -0500 Subject: [PATCH 10/16] GTTree typed collections --- ObjectiveGit/GTTree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveGit/GTTree.h b/ObjectiveGit/GTTree.h index 32e4b1d2f..3635e561a 100644 --- a/ObjectiveGit/GTTree.h +++ b/ObjectiveGit/GTTree.h @@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) NSUInteger entryCount; /// The contents of the tree, as an array of whose objects are of type `GTTreeEntry` -@property (nonatomic, strong, readonly, nullable) NSArray *entries; +@property (nonatomic, strong, readonly, nullable) NSArray *entries; /// The underlying `git_object` as a `git_tree` object. - (git_tree *)git_tree __attribute__((objc_returns_inner_pointer)); From 0932b069c86435780ad7c63f27bf94424bf1ba55 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Sun, 6 Sep 2015 23:29:51 -0500 Subject: [PATCH 11/16] Update Nimble and Quick submodules Update Nimble to `master` branch and Quick to `swift-2.0` branch --- Carthage/Checkouts/Nimble | 2 +- Carthage/Checkouts/Quick | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Carthage/Checkouts/Nimble b/Carthage/Checkouts/Nimble index 8927113f8..70b901e55 160000 --- a/Carthage/Checkouts/Nimble +++ b/Carthage/Checkouts/Nimble @@ -1 +1 @@ -Subproject commit 8927113f877f32c8a01b41b746c4ac261b42c48e +Subproject commit 70b901e55bad427d211b93586a83e0e3bca32034 diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index 8bf96f708..93408cc11 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit 8bf96f708924d728dab5f0cf7543b6f1b896a209 +Subproject commit 93408cc119d5b8a65a26ef0382f5790dd5d7dc01 From e95cd59f5fcc5f02787e07ce825d7f81696928f3 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Tue, 22 Sep 2015 04:41:59 -0500 Subject: [PATCH 12/16] Install xctool from master Attempt to fix test timeouts with most recent commits on xctool's master branch --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d0658a5ca..5ac7b1299 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ osx_image: xcode7 language: objective-c -install: script/bootstrap +before_install: brew update +install: + - brew uninstall xctool && brew install --HEAD xctool + - script/bootstrap script: script/cibuild notifications: email: false From 0adedcd1df560c60d88c73ae5f45358c2abf776f Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Tue, 22 Sep 2015 06:42:53 -0500 Subject: [PATCH 13/16] Update Quick submodule Contains commit related to Xcode7/xctool --- Carthage/Checkouts/Quick | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Carthage/Checkouts/Quick b/Carthage/Checkouts/Quick index 93408cc11..a22e9736e 160000 --- a/Carthage/Checkouts/Quick +++ b/Carthage/Checkouts/Quick @@ -1 +1 @@ -Subproject commit 93408cc119d5b8a65a26ef0382f5790dd5d7dc01 +Subproject commit a22e9736edf55168716dc2bb2f3256ce30061b0e From dca46ad12a958095aca6ee431de842ca62857b11 Mon Sep 17 00:00:00 2001 From: joe DeCapo Date: Wed, 23 Sep 2015 05:26:43 -0500 Subject: [PATCH 14/16] Disable code signing during build Attempting solution from: http://stackoverflow.com/questions/27671854/travis-ci-fails-to-build-with-a-code-signing-error --- script/cibuild | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/script/cibuild b/script/cibuild index 6224abcbf..41e703068 100755 --- a/script/cibuild +++ b/script/cibuild @@ -90,10 +90,16 @@ run_xctool () { if [ -n "$XCWORKSPACE" ] then - xctool -workspace "$XCWORKSPACE" $XCTOOL_OPTIONS "$@" 2>&1 + xctool -workspace "$XCWORKSPACE" $XCTOOL_OPTIONS "$@" \ + ONLY_ACTIVE_ARCH=NO \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO 2>&1 elif [ -n "$XCODEPROJ" ] then - xctool -project "$XCODEPROJ" $XCTOOL_OPTIONS "$@" 2>&1 + xctool -project "$XCODEPROJ" $XCTOOL_OPTIONS "$@" \ + ONLY_ACTIVE_ARCH=NO \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO 2>&1 else echo "*** No workspace or project file found." exit 1 From ff1caef06286edb412872d31299a7b3f4e944d77 Mon Sep 17 00:00:00 2001 From: Aral Balkan Date: Thu, 15 Oct 2015 15:38:30 +0100 Subject: [PATCH 15/16] Added note setup step I had to manually add a header search path as per https://github.com/libgit2/objective-git/issues/441 in order to compile. Added that as a step to the instructions. Only tested on iOS so added to end of that list. Not sure if it also applies for Mac targets (assuming so). If so, please feel free to move to the top where it might make more sense and apply to both. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 863c7f9a5..d3cfdc793 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,8 @@ There are three ways of including ObjectiveGit in a project: 1. Commit the [`Cartfile.resolved`](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfileresolved) +2. Under “Build Settings”, add the following to “Header Search Paths”: `$(SRCROOT)/Carthage/Build/iOS/ObjectiveGit.framework/Headers/` to avoid [`git2/filter.h file not found` errors](https://github.com/libgit2/objective-git/issues/441). + The different instructions for iOS works around an [App Store submission bug](http://www.openradar.me/radar?id=6409498411401216) triggered by universal binaries. From 1129e0933f336a2fc6385c95bffe7fbf0e215174 Mon Sep 17 00:00:00 2001 From: Piet Brauer Date: Wed, 21 Oct 2015 13:08:57 +0700 Subject: [PATCH 16/16] Remove `isAGitDirectory:` As discussed in https://github.com/libgit2/objective-git/issues/524 it is not public and `[GTRepository initWithURL:error:]` should be more future safe. --- ObjectiveGit/GTRepository.m | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ObjectiveGit/GTRepository.m b/ObjectiveGit/GTRepository.m index 49e59ce07..332c565f4 100644 --- a/ObjectiveGit/GTRepository.m +++ b/ObjectiveGit/GTRepository.m @@ -111,21 +111,6 @@ - (void)dealloc { #pragma mark API -+ (BOOL)isAGitDirectory:(NSURL *)directory { - NSFileManager *fm = [[NSFileManager alloc] init]; - BOOL isDir = NO; - NSURL *headFileURL = [directory URLByAppendingPathComponent:@"HEAD"]; - - if ([fm fileExistsAtPath:headFileURL.path isDirectory:&isDir] && !isDir) { - NSURL *objectsDir = [directory URLByAppendingPathComponent:@"objects"]; - if ([fm fileExistsAtPath:objectsDir.path isDirectory:&isDir] && isDir) { - return YES; - } - } - - return NO; -} - + (instancetype)initializeEmptyRepositoryAtFileURL:(NSURL *)localFileURL options:(NSDictionary *)optionsDict error:(NSError **)error { if (!localFileURL.isFileURL || localFileURL.path == nil) { if (error != NULL) *error = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnsupportedSchemeError userInfo:@{ NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid file path URL to initialize repository.", @"") }];