Skip to content

Commit 9219175

Browse files
committed
Merge pull request #516 from JrGoodle/generics-headers
[Xcode 7] Add types to collections in GT headers
2 parents cb4bcb6 + dca46ad commit 9219175

16 files changed

+40
-30
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
osx_image: xcode6.4
1+
osx_image: xcode7
22
language: objective-c
3-
install: script/bootstrap
3+
before_install: brew update
4+
install:
5+
- brew uninstall xctool && brew install --HEAD xctool
6+
- script/bootstrap
47
script: script/cibuild
58
notifications:
69
email: false

Carthage/Checkouts/Nimble

Submodule Nimble updated 75 files

Carthage/Checkouts/Quick

Submodule Quick updated 50 files

ObjectiveGit/GTBlame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
2727
- (nullable instancetype)initWithGitBlame:(git_blame *)blame NS_DESIGNATED_INITIALIZER;
2828

2929
/// Get all the hunks in the blame. A convenience wrapper around `enumerateHunksUsingBlock:`
30-
@property (nonatomic, strong, readonly) NSArray *hunks;
30+
@property (nonatomic, strong, readonly) NSArray<GTBlameHunk *> *hunks;
3131

3232
/// The number of hunks in the blame.
3333
@property (nonatomic, readonly) NSUInteger hunkCount;

ObjectiveGit/GTBranch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN
9292
/// error - If not NULL, set to any error that occurs.
9393
///
9494
/// Returns a (possibly empty) array of GTCommits, or nil if an error occurs.
95-
- (nullable NSArray *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error;
95+
- (nullable NSArray<GTCommit *> *)uniqueCommitsRelativeToBranch:(GTBranch *)otherBranch error:(NSError **)error;
9696

9797
/// Deletes the local branch and nils out the reference.
9898
- (BOOL)deleteWithError:(NSError **)error;

ObjectiveGit/GTCommit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
4040

4141
@property (nonatomic, readonly, strong, nullable) GTSignature *author;
4242
@property (nonatomic, readonly, strong, nullable) GTSignature *committer;
43-
@property (nonatomic, readonly, copy) NSArray *parents;
43+
@property (nonatomic, readonly, copy) NSArray<GTCommit *> *parents;
4444
@property (nonatomic, readonly, nullable) NSString *message;
4545
@property (nonatomic, readonly) NSString *messageDetails;
4646
@property (nonatomic, readonly) NSString *messageSummary;

ObjectiveGit/GTConfiguration.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import <Foundation/Foundation.h>
1010
#import "git2/types.h"
1111

12+
@class GTRemote;
1213
@class GTRepository;
1314
@class GTSignature;
1415

@@ -17,11 +18,11 @@ NS_ASSUME_NONNULL_BEGIN
1718
@interface GTConfiguration : NSObject
1819

1920
@property (nonatomic, readonly, strong, nullable) GTRepository *repository;
20-
@property (nonatomic, readonly, copy) NSArray *configurationKeys;
21+
@property (nonatomic, readonly, copy) NSArray<NSString *> *configurationKeys;
2122

2223
/// The GTRemotes in the config. If the configuration isn't associated with any
2324
/// repository, this will always be nil.
24-
@property (nonatomic, readonly, copy, nullable) NSArray *remotes;
25+
@property (nonatomic, readonly, copy, nullable) NSArray<GTRemote *> *remotes;
2526

2627
- (instancetype)init NS_UNAVAILABLE;
2728

ObjectiveGit/GTEnumerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ NS_ASSUME_NONNULL_BEGIN
115115
/// error - If not NULL, set to any error that occurs during traversal.
116116
///
117117
/// Returns a (possibly empty) array of GTCommits, or nil if an error occurs.
118-
- (nullable NSArray *)allObjectsWithError:(NSError **)error;
118+
- (nullable NSArray<GTCommit *> *)allObjectsWithError:(NSError **)error;
119119

120120
/// Gets the next commit.
121121
///

ObjectiveGit/GTIndex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
4949
@property (nonatomic, readonly) NSUInteger entryCount;
5050

5151
/// The GTIndexEntries in the index.
52-
@property (nonatomic, readonly, copy) NSArray *entries;
52+
@property (nonatomic, readonly, copy) NSArray<GTIndexEntry *> *entries;
5353

5454
/// Whether the index contains conflicted files.
5555
@property (nonatomic, readonly) BOOL hasConflicts;
@@ -220,7 +220,7 @@ NS_ASSUME_NONNULL_BEGIN
220220
/// error - When something goes wrong, this parameter is set. Optional.
221221
///
222222
/// Returns `YES` in the event that everything has gone smoothly. Otherwise, `NO`.
223-
- (BOOL)updatePathspecs:(nullable NSArray *)pathspecs error:(NSError **)error passingTest:(nullable BOOL (^)(NSString *matchedPathspec, NSString *path, BOOL *stop))block;
223+
- (BOOL)updatePathspecs:(nullable NSArray<NSString*> *)pathspecs error:(NSError **)error passingTest:(nullable BOOL (^)(NSString *matchedPathspec, NSString *path, BOOL *stop))block;
224224

225225
#pragma mark Deprecations
226226
- (nullable GTIndexEntry *)entryWithName:(NSString *)name __deprecated_msg("use entryWithPath: instead.");

ObjectiveGit/GTRemote.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ typedef enum {
5656
///
5757
/// This array will contain NSStrings of the form
5858
/// `+refs/heads/*:refs/remotes/REMOTE/*`.
59-
@property (nonatomic, readonly, copy, nullable) NSArray *fetchRefspecs;
59+
@property (nonatomic, readonly, copy, nullable) NSArray<NSString *> *fetchRefspecs;
6060

6161
/// The push refspecs for this remote.
6262
///
6363
/// This array will contain NSStrings of the form
6464
/// `+refs/heads/*:refs/remotes/REMOTE/*`.
65-
@property (nonatomic, readonly, copy, nullable) NSArray *pushRefspecs;
65+
@property (nonatomic, readonly, copy, nullable) NSArray<NSString *> *pushRefspecs;
6666

6767
/// Tests if a name is valid
6868
+ (BOOL)isValidRemoteName:(NSString *)name;

ObjectiveGit/GTRepository+Committing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ NS_ASSUME_NONNULL_BEGIN
2525
/// error - The error if one occurred.
2626
///
2727
/// Returns the newly created commit, or nil if an error occurred.
28-
- (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;
28+
- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message author:(GTSignature *)author committer:(GTSignature *)committer parents:(nullable NSArray<GTCommit *> *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error;
2929

3030
/// Creates a new commit using +createCommitWithTree:message:author:committer:parents:updatingReferenceNamed:error:
3131
/// with -userSignatureForNow as both the author and committer.
32-
- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message parents:(nullable NSArray *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error;
32+
- (nullable GTCommit *)createCommitWithTree:(GTTree *)tree message:(NSString *)message parents:(nullable NSArray<GTCommit *> *)parents updatingReferenceNamed:(nullable NSString *)refName error:(NSError **)error;
3333

3434
@end
3535

ObjectiveGit/GTRepository+RemoteOperations.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern NSString *const GTRepositoryRemoteOptionsCredentialProvider;
4848
/// error - The error if one ocurred. Can be NULL.
4949
///
5050
/// Retruns a (possibly empty) array with GTFetchHeadEntry objects. Will not be nil.
51-
- (NSArray *)fetchHeadEntriesWithError:(NSError **)error;
51+
- (NSArray<GTFetchHeadEntry *> *)fetchHeadEntriesWithError:(NSError **)error;
5252

5353
#pragma mark - Push
5454

@@ -78,7 +78,7 @@ extern NSString *const GTRepositoryRemoteOptionsCredentialProvider;
7878
///
7979
/// Returns YES if the push was successful, NO otherwise (and `error`, if provided,
8080
/// will point to an error describing what happened).
81-
- (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;
81+
- (BOOL)pushBranches:(NSArray<GTBranch *> *)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;
8282

8383
/// Delete a remote branch
8484
///

ObjectiveGit/GTRepository+Reset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
3737
/// error - The error if one occurred.
3838
///
3939
/// Returns whether the reset was successful.
40-
- (BOOL)resetPathspecs:(NSArray *)pathspecs toCommit:(GTCommit *)commit error:(NSError **)error;
40+
- (BOOL)resetPathspecs:(NSArray<NSString *> *)pathspecs toCommit:(GTCommit *)commit error:(NSError **)error;
4141

4242
@end
4343

ObjectiveGit/GTRepository.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString;
260260
///
261261
/// returns an array of NSStrings holding the names of the references
262262
/// returns nil if an error occurred and fills the error parameter
263-
- (nullable NSArray *)referenceNamesWithError:(NSError **)error;
263+
- (nullable NSArray<NSString *> *)referenceNamesWithError:(NSError **)error;
264264

265265
/// Get the HEAD reference.
266266
///
@@ -274,44 +274,44 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString;
274274
/// error - If not NULL, set to any error that occurs.
275275
///
276276
/// Returns an array of GTBranches or nil if an error occurs.
277-
- (nullable NSArray *)localBranchesWithError:(NSError **)error;
277+
- (nullable NSArray<GTBranch *> *)localBranchesWithError:(NSError **)error;
278278

279279
/// Get the remote branches.
280280
///
281281
/// error - If not NULL, set to any error that occurs.
282282
///
283283
/// Returns an array of GTBranches or nil if an error occurs.
284-
- (nullable NSArray *)remoteBranchesWithError:(NSError **)error;
284+
- (nullable NSArray<GTBranch *> *)remoteBranchesWithError:(NSError **)error;
285285

286286
/// Get branches with names sharing a given prefix.
287287
///
288288
/// prefix - The prefix to use for filtering. Must not be nil.
289289
/// error - If not NULL, set to any error that occurs.
290290
///
291291
/// Returns an array of GTBranches or nil if an error occurs.
292-
- (nullable NSArray *)branchesWithPrefix:(NSString *)prefix error:(NSError **)error;
292+
- (nullable NSArray<GTBranch *> *)branchesWithPrefix:(NSString *)prefix error:(NSError **)error;
293293

294294
/// Get the local and remote branches and merge them together by combining local
295295
/// branches with their remote branch, if they have one.
296296
///
297297
/// error - If not NULL, set to any error that occurs.
298298
///
299299
/// Returns an array of GTBranches or nil if an error occurs.
300-
- (nullable NSArray *)branches:(NSError **)error;
300+
- (nullable NSArray<GTBranch *> *)branches:(NSError **)error;
301301

302302
/// List all remotes in the repository
303303
///
304304
/// error - will be filled if an error occurs
305305
///
306306
/// returns an array of NSStrings holding the names of the remotes, or nil if an error occurred
307-
- (nullable NSArray *)remoteNamesWithError:(NSError **)error;
307+
- (nullable NSArray<NSString *> *)remoteNamesWithError:(NSError **)error;
308308

309309
/// Get all tags in the repository.
310310
///
311311
/// error - If not NULL, set to any error that occurs.
312312
///
313313
/// Returns an array of GTTag or nil if an error occurs.
314-
- (nullable NSArray *)allTagsWithError:(NSError **)error;
314+
- (nullable NSArray<GTTag *> *)allTagsWithError:(NSError **)error;
315315

316316
/// Count all commits in the current branch (HEAD)
317317
///
@@ -367,7 +367,7 @@ extern NSString * const GTRepositoryInitOptionsOriginURLString;
367367
/// error(out) - will be filled if an error occurs
368368
///
369369
/// returns the local commits, an empty array if there is no remote branch, or nil if an error occurred
370-
- (nullable NSArray *)localCommitsRelativeToRemoteBranch:(GTBranch *)remoteBranch error:(NSError **)error;
370+
- (nullable NSArray<GTCommit *> *)localCommitsRelativeToRemoteBranch:(GTBranch *)remoteBranch error:(NSError **)error;
371371

372372
/// Retrieves git's "prepared message" for the next commit, like the default
373373
/// message pre-filled when committing after a conflicting merge.

ObjectiveGit/GTTree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
4747
@property (nonatomic, readonly) NSUInteger entryCount;
4848

4949
/// The contents of the tree, as an array of whose objects are of type `GTTreeEntry`
50-
@property (nonatomic, strong, readonly, nullable) NSArray *entries;
50+
@property (nonatomic, strong, readonly, nullable) NSArray<GTTreeEntry *> *entries;
5151

5252
/// The underlying `git_object` as a `git_tree` object.
5353
- (git_tree *)git_tree __attribute__((objc_returns_inner_pointer));

script/cibuild

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,16 @@ run_xctool ()
9090
{
9191
if [ -n "$XCWORKSPACE" ]
9292
then
93-
xctool -workspace "$XCWORKSPACE" $XCTOOL_OPTIONS "$@" 2>&1
93+
xctool -workspace "$XCWORKSPACE" $XCTOOL_OPTIONS "$@" \
94+
ONLY_ACTIVE_ARCH=NO \
95+
CODE_SIGN_IDENTITY="" \
96+
CODE_SIGNING_REQUIRED=NO 2>&1
9497
elif [ -n "$XCODEPROJ" ]
9598
then
96-
xctool -project "$XCODEPROJ" $XCTOOL_OPTIONS "$@" 2>&1
99+
xctool -project "$XCODEPROJ" $XCTOOL_OPTIONS "$@" \
100+
ONLY_ACTIVE_ARCH=NO \
101+
CODE_SIGN_IDENTITY="" \
102+
CODE_SIGNING_REQUIRED=NO 2>&1
97103
else
98104
echo "*** No workspace or project file found."
99105
exit 1

0 commit comments

Comments
 (0)