Skip to content

Commit 2811537

Browse files
committed
Merge pull request #449 from phatblat/phatblat/pr/desinit
Mark NS_DESIGNATED_INITIALIZER methods
2 parents 13c32cb + cb59989 commit 2811537

29 files changed

+30
-30
lines changed

ObjectiveGit/GTBlame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@interface GTBlame : NSObject
1717

1818
/// Designated initializer.
19-
- (instancetype)initWithGitBlame:(git_blame *)blame;
19+
- (instancetype)initWithGitBlame:(git_blame *)blame NS_DESIGNATED_INITIALIZER;
2020

2121
/// Get all the hunks in the blame. A convenience wrapper around `enumerateHunksUsingBlock:`
2222
@property (nonatomic, strong, readonly) NSArray *hunks;

ObjectiveGit/GTBlameHunk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// A `GTBlameHunk` is an object that provides authorship info for a set of lines in a `GTBlame`.
1616
@interface GTBlameHunk : NSObject
1717

18-
- (instancetype)initWithGitBlameHunk:(git_blame_hunk)hunk;
18+
- (instancetype)initWithGitBlameHunk:(git_blame_hunk)hunk NS_DESIGNATED_INITIALIZER;
1919

2020
/// A NSRange where `location` is the (1 based) starting line number,
2121
/// and `length` is the number of lines in the hunk.

ObjectiveGit/GTBranch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef NS_ENUM(NSInteger, GTBranchType) {
5252
+ (NSString *)localNamePrefix;
5353
+ (NSString *)remoteNamePrefix;
5454

55-
- (id)initWithReference:(GTReference *)ref repository:(GTRepository *)repo;
55+
- (id)initWithReference:(GTReference *)ref repository:(GTRepository *)repo NS_DESIGNATED_INITIALIZER;
5656
+ (id)branchWithReference:(GTReference *)ref repository:(GTRepository *)repo;
5757

5858
/// Get the target commit for this branch

ObjectiveGit/GTConfiguration+Private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
/// repository - The repository in which the config resides. May be nil.
1919
///
2020
/// Returns the initialized object.
21-
- (id)initWithGitConfig:(git_config *)config repository:(GTRepository *)repository;
21+
- (id)initWithGitConfig:(git_config *)config repository:(GTRepository *)repository NS_DESIGNATED_INITIALIZER;
2222

2323
@end

ObjectiveGit/GTDiff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ typedef NS_OPTIONS(NSInteger, GTDiffFindOptionsFlags) {
263263
/// repository - The repository in which the diff lives. Cannot be nil.
264264
///
265265
/// Returns the initialized object.
266-
- (instancetype)initWithGitDiff:(git_diff *)diff repository:(GTRepository *)repository;
266+
- (instancetype)initWithGitDiff:(git_diff *)diff repository:(GTRepository *)repository NS_DESIGNATED_INITIALIZER;
267267

268268
/// The libgit2 diff object.
269269
- (git_diff *)git_diff __attribute__((objc_returns_inner_pointer));

ObjectiveGit/GTDiffDelta.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ @interface GTDiffDelta ()
3232
/// the given diff delta. Must not be nil.
3333
///
3434
/// This is the designated initializer for this class.
35-
- (instancetype)initWithGitDiffDeltaBlock:(git_diff_delta (^)(void))deltaAccessor patchGeneratorBlock:(int (^)(git_patch **patch))patchGenerator;
35+
- (instancetype)initWithGitDiffDeltaBlock:(git_diff_delta (^)(void))deltaAccessor patchGeneratorBlock:(int (^)(git_patch **patch))patchGenerator NS_DESIGNATED_INITIALIZER;
3636

3737
@end
3838

ObjectiveGit/GTDiffFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ typedef NS_OPTIONS(NSInteger, GTDiffFileFlag) {
5151
/// file - The git_diff_file wrapped by the receiver.
5252
///
5353
/// Returns an initialized GTDiffFile.
54-
- (instancetype)initWithGitDiffFile:(git_diff_file)file;
54+
- (instancetype)initWithGitDiffFile:(git_diff_file)file NS_DESIGNATED_INITIALIZER;
5555

5656
@end

ObjectiveGit/GTDiffHunk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
///
2525
/// The contents of a hunk are lazily loaded, therefore we initialise the object
2626
/// simply with the patch it originates from and which hunk index it represents.
27-
- (instancetype)initWithPatch:(GTDiffPatch *)patch hunkIndex:(NSUInteger)hunkIndex;
27+
- (instancetype)initWithPatch:(GTDiffPatch *)patch hunkIndex:(NSUInteger)hunkIndex NS_DESIGNATED_INITIALIZER;
2828

2929
/// Perfoms the given block on each line in the hunk.
3030
///

ObjectiveGit/GTDiffLine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ typedef NS_ENUM(char, GTDiffLineOrigin) {
4444
@property (nonatomic, readonly) NSInteger lineCount;
4545

4646
/// Designated initialiser.
47-
- (instancetype)initWithGitLine:(const git_diff_line *)line;
47+
- (instancetype)initWithGitLine:(const git_diff_line *)line NS_DESIGNATED_INITIALIZER;
4848

4949
@end

ObjectiveGit/GTDiffPatch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/// automatically be freed when the receiver is deallocated. Must not be
3737
/// NULL.
3838
/// delta - The diff delta corresponding to this patch. Must not be nil.
39-
- (instancetype)initWithGitPatch:(git_patch *)patch delta:(GTDiffDelta *)delta;
39+
- (instancetype)initWithGitPatch:(git_patch *)patch delta:(GTDiffDelta *)delta NS_DESIGNATED_INITIALIZER;
4040

4141
/// Returns the underlying patch object.
4242
- (git_patch *)git_patch __attribute__((objc_returns_inner_pointer));

0 commit comments

Comments
 (0)