mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-20 16:24:42 +00:00
remote: add accessors for the autotag setting
This commit is contained in:
parent
a37ddf7ef8
commit
f70e466f68
@ -310,6 +310,23 @@ enum {
|
|||||||
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
|
GIT_REMOTE_DOWNLOAD_TAGS_AUTO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the tag auto-follow setting
|
||||||
|
*
|
||||||
|
* @param remote the remote to query
|
||||||
|
* @return the auto-follow setting
|
||||||
|
*/
|
||||||
|
GIT_EXTERN(int) git_remote_autotag(git_remote *remote);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the tag auto-follow setting
|
||||||
|
*
|
||||||
|
* @param remote the remote to configure
|
||||||
|
* @param value a GIT_REMOTE_DOWNLOAD_TAGS value
|
||||||
|
*/
|
||||||
|
GIT_EXTERN(void) git_remote_set_autotag(git_remote *remote, int value);
|
||||||
|
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
GIT_END_DECL
|
GIT_END_DECL
|
||||||
#endif
|
#endif
|
||||||
|
10
src/remote.c
10
src/remote.c
@ -722,3 +722,13 @@ void git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callback
|
|||||||
remote->transport->cb_data = remote->callbacks.data;
|
remote->transport->cb_data = remote->callbacks.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int git_remote_autotag(git_remote *remote)
|
||||||
|
{
|
||||||
|
return remote->download_tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
void git_remote_set_autotag(git_remote *remote, int value)
|
||||||
|
{
|
||||||
|
remote->download_tags = value;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user