@@ -97,19 +97,39 @@ typedef NS_ENUM(NSInteger, GTFetchPruneOption) {
9797// / will point to an error describing what happened).
9898- (BOOL )pushBranches : (NSArray <GTBranch *> *)branches toRemote : (GTRemote *)remote withOptions : (nullable NSDictionary *)options error : (NSError **)error progress : (nullable void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock;
9999
100- // / Push a given Git notes reference name to a remote.
100+ // / Push an array of branches to a remote, together with notes (in one push).
101+ // / Normally, if you use Git notes functionality, to push the notes to remote, you would have to
102+ // / do two operations: pushBranches followed by pushNotes. This is unrational, so we offer you a handy
103+ // / shortcut that allows to push the branches together with the notes.
101104// /
102- // / noteRef - Name of the notes reference. If NULL, will default to whatever the default is (e.g. "refs/notes/commits")
105+ // / branches - An array of branches to push. Must not be nil.
103106// / remote - The remote to push to. Must not be nil.
104107// / options - Options applied to the push operation. Can be NULL.
105108// / Recognized options are:
106109// / `GTRepositoryRemoteOptionsCredentialProvider`
110+ // / referenceName - Reference name for notes, if they should be pushed together with the branches.
111+ // / Use +[GTNote defaultReferenceNameWithError:] to push the default note reference.
112+ // / Passing NULL here will make notes NOT to be pushed.
107113// / error - The error if one occurred. Can be NULL.
108114// / progressBlock - An optional callback for monitoring progress. May be NULL.
109115// /
110116// / Returns YES if the push was successful, NO otherwise (and `error`, if provided,
111117// / will point to an error describing what happened).
112- - (BOOL )pushNotes : (nullable NSString *)noteRef toRemote : (GTRemote *)remote withOptions : (nullable NSDictionary *)options error : (NSError **)error progress : (nullable void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock;
118+ - (BOOL )pushBranches : (NSArray <GTBranch *> *)branches toRemote : (GTRemote *)remote withOptions : (nullable NSDictionary *)options withNotesReferenceName : (nullable NSString *)notesReferenceName error : (NSError **)error progress : (nullable void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock;
119+
120+ // / Push a given Git notes reference name to a remote.
121+ // /
122+ // / noteReferenceName - Name of the notes reference. If NULL, will default to whatever the default is (e.g. "refs/notes/commits")
123+ // / remote - The remote to push to. Must not be nil.
124+ // / options - Options applied to the push operation. Can be NULL.
125+ // / Recognized options are:
126+ // / `GTRepositoryRemoteOptionsCredentialProvider`
127+ // / error - The error if one occurred. Can be NULL.
128+ // / progressBlock - An optional callback for monitoring progress. May be NULL.
129+ // /
130+ // / Returns YES if the push was successful, NO otherwise (and `error`, if provided,
131+ // / will point to an error describing what happened).
132+ - (BOOL )pushNotes : (nullable NSString *)noteReferenceName toRemote : (GTRemote *)remote withOptions : (nullable NSDictionary *)options error : (NSError **)error progress : (nullable void (^)(unsigned int current, unsigned int total, size_t bytes, BOOL *stop))progressBlock;
113133
114134// / Delete a remote branch
115135// /
0 commit comments