@@ -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 (NSInteger , 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// /
@@ -209,6 +219,17 @@ typedef NS_ENUM(NSInteger, GTRepositoryStateType) {
209219// / Returns the initialized repository, or nil if an error occurred.
210220- (nullable instancetype )initWithURL : (NSURL *)localFileURL error : (NSError **)error ;
211221
222+ // / Convenience initializer to find and open a repository with extended controls.
223+ // /
224+ // / localFileURL - The file URL for the new repository. Cannot be nil.
225+ // / flags - A combination of the `GTRepositoryOpenFlags` flags.
226+ // / ceilingDirURLs - An array of URLs at which the search for a containing
227+ // / repository should terminate. Can be NULL.
228+ // / error - The error if one occurs.
229+ // /
230+ // / Returns the initialized repository, or nil if an error occurred.
231+ - (nullable instancetype )initWithURL : (NSURL *)localFileURL flags : (NSInteger )flags ceilingDirs : (nullable NSArray <NSURL *> *)ceilingDirURLs error : (NSError **)error ;
232+
212233- (instancetype )init NS_UNAVAILABLE;
213234
214235// / Initializes the receiver to wrap the given repository object. Designated initializer.
0 commit comments