8000 remote: drop bitfields in git_remote_fetch_options by ethomson · Pull Request #6806 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

remote: drop bitfields in git_remote_fetch_options #6806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
6 changes: 2 additions & 4 deletions include/git2/remote.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }

Expand Down
7 changes: 1 addition & 6 deletions src/libgit2/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading
0