forked from libgit2/objective-git
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathGTRepository+Pull.h
More file actions
37 lines (29 loc) · 1.26 KB
/
GTRepository+Pull.h
File metadata and controls
37 lines (29 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// GTRepository+Pull.h
// ObjectiveGitFramework
//
// Created by Ben Chatelain on 6/17/15.
// Copyright © 2015 GitHub, Inc. All rights reserved.
//
#import "GTRepository.h"
NS_ASSUME_NONNULL_BEGIN
typedef void (^GTRemoteFetchTransferProgressBlock)(const git_indexer_progress *progress, BOOL *stop);
@interface GTRepository (Pull)
#pragma mark - Pull
/// Pull a single branch from a remote.
///
/// branch - The branch to pull.
/// remote - The remote to pull from.
/// options - Options applied to the fetch operation.
/// Recognized options are:
/// `GTRepositoryRemoteOptionsCredentialProvider`
/// `GTRepositoryRemoteOptionsFetchPrune`
/// `GTRepositoryRemoteOptionsDownloadTags`
/// error - The error if one occurred. Can be NULL.
/// progressBlock - An optional callback for monitoring progress.
///
/// Returns YES if the pull was successful, NO otherwise (and `error`, if provided,
/// will point to an error describing what happened).
- (BOOL)pullBranch:(GTBranch *)branch fromRemote:(GTRemote *)remote withOptions:(NSDictionary * _Nullable)options error:(NSError **)error progress:(GTRemoteFetchTransferProgressBlock _Nullable)progressBlock;
@end
NS_ASSUME_NONNULL_END