diff --git a/include/git2/remote.h b/include/git2/remote.h index 7067c88b0b1..5505f6c358d 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -746,8 +746,7 @@ typedef struct { /** * How to handle reference updates; see `git_remote_update_flags`. */ - unsigned int update_fetchhead : 1, - report_unchanged : 1; + unsigned int update_fetchhead; /** * Determines how to behave regarding tags on the remote, such @@ -790,8 +789,7 @@ typedef struct { GIT_FETCH_OPTIONS_VERSION, \ GIT_REMOTE_CALLBACKS_INIT, \ GIT_FETCH_PRUNE_UNSPECIFIED, \ - 1, \ - 0, \ + GIT_REMOTE_UPDATE_FETCHHEAD, \ GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, \ GIT_PROXY_OPTIONS_INIT } diff --git a/src/libgit2/remote.c b/src/libgit2/remote.c index 8b07c83184a..8b486ea3550 100644 --- a/src/libgit2/remote.c +++ b/src/libgit2/remote.c @@ -1376,12 +1376,7 @@ int git_remote_fetch( return error; if (opts) { - if (opts->update_fetchhead) - update_flags |= GIT_REMOTE_UPDATE_FETCHHEAD; - - if (opts->report_unchanged) - update_flags |= GIT_REMOTE_UPDATE_REPORT_UNCHANGED; - + update_flags = opts->update_fetchhead; tagopt = opts->download_tags; }