@@ -110,6 +110,16 @@ extern NSString * const GTRepositoryCloneOptionsCloneLocal;
110110// / A NSURL pointing to a local file that contains PEM-encoded certificate chain.
111111extern NSString *const GTRepositoryCloneOptionsServerCertificateURL;
112112
113+ // / Repository extended open control flags for
114+ // / +initWithURL:flags:ceilingDirs:error:.
115+ // /
116+ // / See respository.h for documentation of each individual flag.
117+ typedef NS_OPTIONS (UInt32, GTRepositoryOpenFlags) {
118+ GTRepositoryOpenNoSearch = GIT_REPOSITORY_OPEN_NO_SEARCH,
119+ GTRepositoryOpenCrossFS = GIT_REPOSITORY_OPEN_CROSS_FS,
120+ GTRepositoryOpenBare = GIT_REPOSITORY_OPEN_BARE,
121+ };
122+
113123// / Initialization flags associated with `GTRepositoryInitOptionsFlags` for
114124// / +initializeEmptyRepositoryAtFileURL:options:error:.
115125// /
@@ -201,6 +211,18 @@ typedef NS_ENUM(NSInteger, GTRepositoryStateType) {
201211// / Returns the initialized repository, or nil if an error occurred.
202212+ (nullable instancetype )repositoryWithURL : (NSURL *)localFileURL error : (NSError **)error ;
203213
214+ // / Convenience class initializer to find and open a repository with extended controls.
215+ // /
216+ // / localFileURL - The file URL for the new repository. Cannot be nil.
217+ // / flags - A combination of the `GTRepositoryOpenFlags` flags.
218+ // / ceilingDirs - A GIT_PATH_LIST_SEPARATOR delimited list of path prefixes at
219+ // / which the search for a containing repository should terminate.
220+ // / Can be NULL.
221+ // / error - The error if one occurs.
222+ // /
223+ // / Returns the initialized repository, or nil if an error occurred.
224+ + (nullable instancetype )initWithURL : (NSURL *)localFileURL flags : (UInt32)flags ceilingDirs : (nullable const char *)ceilingDirs error : (NSError **)error ;
225+
204226// / Convenience initializer which uses the default options.
205227// /
206228// / localFileURL - The file URL for the new repository. Cannot be nil.
@@ -209,6 +231,18 @@ typedef NS_ENUM(NSInteger, GTRepositoryStateType) {
209231// / Returns the initialized repository, or nil if an error occurred.
210232- (nullable instancetype )initWithURL : (NSURL *)localFileURL error : (NSError **)error ;
211233
234+ // / Convenience initializer to find and open a repository with extended controls.
235+ // /
236+ // / localFileURL - The file URL for the new repository. Cannot be nil.
237+ // / flags - A combination of the `GTRepositoryOpenFlags` flags.
238+ // / ceilingDirs - A GIT_PATH_LIST_SEPARATOR delimited list of path prefixes at
239+ // / which the search for a containing repository should terminate.
240+ // / Can be NULL.
241+ // / error - The error if one occurs.
242+ // /
243+ // / Returns the initialized repository, or nil if an error occurred.
244+ - (nullable instancetype )initWithURL : (NSURL *)localFileURL flags : (UInt32)flags ceilingDirs : (nullable const char *)ceilingDirs error : (NSError **)error ;
245+
212246- (instancetype )init NS_UNAVAILABLE;
213247
214248// / Initializes the receiver to wrap the given repository object. Designated initializer.
0 commit comments