Skip to content

Commit 3cec633

Browse files
author
Ben Chatelain
committed
Merge pull request #479 from libgit2/nullabilly
Give extern'd string known nullability.
2 parents 083a733 + aa42b16 commit 3cec633

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

ObjectiveGit/GTDiff.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
@class GTRepository;
1515
@class GTTree;
1616

17+
NS_ASSUME_NONNULL_BEGIN
18+
1719
/// An `NSNumber` wrapped `GTDiffOptionsFlags` representing any flags you wish to
1820
/// pass into the initialisation.
1921
extern NSString *const GTDiffOptionsFlagsKey;
@@ -172,8 +174,6 @@ typedef NS_OPTIONS(NSInteger, GTDiffFindOptionsFlags) {
172174
GTDiffFindOptionsFlagsBreakRewritesForRenamesOnly = GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY,
173175
};
174176

175-
NS_ASSUME_NONNULL_BEGIN
176-
177177
/// A class representing a single "diff".
178178
///
179179
/// Analagous to `git_diff_list` in libgit2, this object represents a list of

ObjectiveGit/GTFilter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
@class GTRepository;
1212
@class GTFilterSource;
1313

14+
NS_ASSUME_NONNULL_BEGIN
15+
1416
/// The error domain for errors originating from GTFilter.
1517
extern NSString * const GTFilterErrorDomain;
1618

1719
/// A filter with that name has already been registered.
1820
extern const NSInteger GTFilterErrorNameAlreadyRegistered;
1921

20-
NS_ASSUME_NONNULL_BEGIN
21-
2222
/// Git filter abstraction.
2323
///
2424
/// **Note**: GTFilter is *not* thread safe. Registration and unregistration

ObjectiveGit/GTRemote.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
@class GTReference;
1515
@class GTCredentialProvider;
1616

17+
NS_ASSUME_NONNULL_BEGIN
18+
1719
extern NSString * const GTRemoteRenameProblematicRefSpecs;
1820

1921
// Auto Tag settings. See `git_remote_autotag_option_t`.
@@ -23,8 +25,6 @@ typedef enum {
2325
GTRemoteDownloadTagsAll = GIT_REMOTE_DOWNLOAD_TAGS_ALL,
2426
} GTRemoteAutoTagOption;
2527

26-
NS_ASSUME_NONNULL_BEGIN
27-
2828
/// A class representing a remote for a git repository.
2929
///
3030
/// Analogous to `git_remote` in libgit2.

ObjectiveGit/GTRepository+RemoteOperations.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
@class GTFetchHeadEntry;
1212

13+
NS_ASSUME_NONNULL_BEGIN
14+
1315
/// A `GTCredentialProvider`, that will be used to authenticate against the remote.
1416
extern NSString *const GTRepositoryRemoteOptionsCredentialProvider;
1517

16-
NS_ASSUME_NONNULL_BEGIN
17-
1818
@interface GTRepository (RemoteOperations)
1919

2020
#pragma mark - Fetch

ObjectiveGit/GTRepository+Status.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
@class GTStatusDelta;
1414

15+
NS_ASSUME_NONNULL_BEGIN
16+
1517
/// An enum representing the status of a file
1618
/// See git_status_t
1719
typedef NS_OPTIONS(NSInteger, GTFileStatusFlags) {
@@ -81,8 +83,6 @@ typedef enum {
8183
/// Defaults to including all files.
8284
extern NSString *const GTRepositoryStatusOptionsPathSpecArrayKey;
8385

84-
NS_ASSUME_NONNULL_BEGIN
85-
8686
@interface GTRepository (Status)
8787

8888
/// `YES` if the working directory has no modified, new, or deleted files.

ObjectiveGit/GTRepository.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
@class GTTree;
5353
@class GTRemote;
5454

55+
NS_ASSUME_NONNULL_BEGIN
56+
5557
/// Checkout strategies used by the various -checkout... methods
5658
/// See git_checkout_strategy_t
5759
typedef NS_OPTIONS(NSInteger, GTCheckoutStrategyType) {
@@ -148,8 +150,6 @@ extern NSString * const GTRepositoryInitOptionsInitialHEAD;
148150
/// initialization.
149151
extern NSString * const GTRepositoryInitOptionsOriginURLString;
150152

151-
NS_ASSUME_NONNULL_BEGIN
152-
153153
@interface GTRepository : NSObject
154154

155155
/// The file URL for the repository's working directory.

0 commit comments

Comments
 (0)