+[GTDiff diffOldTree:withNewIndex:…] by slavikus · Pull Request #539 · libgit2/objective-git
Expand Up
@@ -13,6 +13,7 @@
@class GTDiffDelta;
@class GTRepository;
@class GTTree;
@class GTIndex;
NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -200,6 +201,23 @@ typedef NS_OPTIONS(NSInteger, GTDiffFindOptionsFlags) { /// Returns a newly created `GTDiff` object or nil on error. + (nullable instancetype)diffOldTree:(nullable GTTree *)oldTree withNewTree:(nullable GTTree *)newTree inRepository:(GTRepository *)repository options:(nullable NSDictionary *)options error:(NSError **)error;
/// Create a diff between `GTTree` and `GTIndex`. /// /// Both instances must be from the same repository, or an exception will be thrown. /// /// oldTree - The "left" side of the diff. May be nil to represent an empty /// tree. /// newIndex - The "right" side of the diff. May be nil to represent an empty /// index. /// repository - The repository to be used for the diff. Cannot be nil. /// options - A dictionary containing any of the above options key constants, or /// nil to use the defaults. /// error - Populated with an `NSError` object on error, if information is /// available. /// /// Returns a newly created `GTDiff` object or nil on error. + (nullable instancetype)diffOldTree:(nullable GTTree *)oldTree withNewIndex:(nullable GTIndex *)newIndex inRepository:(GTRepository *)repository options:(nullable NSDictionary *)options error:(NSError **)error;
/// Create a diff between a repository's current index. /// /// This is equivalent to `git diff --cached <treeish>` or if you pass the HEAD Expand Down
NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -200,6 +201,23 @@ typedef NS_OPTIONS(NSInteger, GTDiffFindOptionsFlags) { /// Returns a newly created `GTDiff` object or nil on error. + (nullable instancetype)diffOldTree:(nullable GTTree *)oldTree withNewTree:(nullable GTTree *)newTree inRepository:(GTRepository *)repository options:(nullable NSDictionary *)options error:(NSError **)error;
/// Create a diff between `GTTree` and `GTIndex`. /// /// Both instances must be from the same repository, or an exception will be thrown. /// /// oldTree - The "left" side of the diff. May be nil to represent an empty /// tree. /// newIndex - The "right" side of the diff. May be nil to represent an empty /// index. /// repository - The repository to be used for the diff. Cannot be nil. /// options - A dictionary containing any of the above options key constants, or /// nil to use the defaults. /// error - Populated with an `NSError` object on error, if information is /// available. /// /// Returns a newly created `GTDiff` object or nil on error. + (nullable instancetype)diffOldTree:(nullable GTTree *)oldTree withNewIndex:(nullable GTIndex *)newIndex inRepository:(GTRepository *)repository options:(nullable NSDictionary *)options error:(NSError **)error;
/// Create a diff between a repository's current index. /// /// This is equivalent to `git diff --cached <treeish>` or if you pass the HEAD Expand Down