fetch: avoid API breaking-changes from v1.7

Update `git_fetch_options` to break out the fetch options into
individual options. This prevents creating an API breaking change from
v1.7.0. `git_remote_update_tips` retains the `update_flags` to also
avoid an API breaking change.
This commit is contained in:
Edward Thomson
2024-03-17 21:18:06 +00:00
parent 2fe50e295d
commit 2eb3fecd03
3 changed files with 12 additions and 6 deletions

View File

@@ -744,10 +744,10 @@ typedef struct {
git_fetch_prune_t prune;
/**
* How to handle reference updates; a combination of
* `git_remote_update_flags`.
* How to handle reference updates; see `git_remote_update_flags`.
*/
unsigned int update_flags;
unsigned int update_fetchhead : 1,
report_unchanged : 1;
/**
* Determines how to behave regarding tags on the remote, such
@@ -790,7 +790,8 @@ typedef struct {
GIT_FETCH_OPTIONS_VERSION, \
GIT_REMOTE_CALLBACKS_INIT, \
GIT_FETCH_PRUNE_UNSPECIFIED, \
GIT_REMOTE_UPDATE_FETCHHEAD, \
1, \
0, \
GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, \
GIT_PROXY_OPTIONS_INIT }