summaryrefslogtreecommitdiffstats
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:06 +0000
commit4ffc4372dff6595a86120ec0bd311c4cb5fb8ed6 (patch)
tree582224c3f88627b5797d1b57ccaf158c7d36118e /include/git2/remote.h
parentReleasing progress-linux version 1.7.2+ds-1~progress7.99u1. (diff)
downloadlibgit2-4ffc4372dff6595a86120ec0bd311c4cb5fb8ed6.tar.xz
libgit2-4ffc4372dff6595a86120ec0bd311c4cb5fb8ed6.zip
Merging upstream version 1.8.1+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--include/git2/remote.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index e9065b2..5505f6c 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -77,6 +77,17 @@ typedef enum {
} git_remote_create_flags;
/**
+ * How to handle reference updates.
+ */
+typedef enum {
+ /* Write the fetch results to FETCH_HEAD. */
+ GIT_REMOTE_UPDATE_FETCHHEAD = (1 << 0),
+
+ /* Report unchanged tips in the update_tips callback. */
+ GIT_REMOTE_UPDATE_REPORT_UNCHANGED = (1 << 1)
+} git_remote_update_flags;
+
+/**
* Remote creation options structure
*
* Initialize with `GIT_REMOTE_CREATE_OPTIONS_INIT`. Alternatively, you can
@@ -733,10 +744,9 @@ typedef struct {
git_fetch_prune_t prune;
/**
- * Whether to write the results to FETCH_HEAD. Defaults to
- * on. Leave this default in order to behave like git.
+ * How to handle reference updates; see `git_remote_update_flags`.
*/
- int update_fetchhead;
+ unsigned int update_fetchhead;
/**
* Determines how to behave regarding tags on the remote, such
@@ -775,8 +785,13 @@ typedef struct {
} git_fetch_options;
#define GIT_FETCH_OPTIONS_VERSION 1
-#define GIT_FETCH_OPTIONS_INIT { GIT_FETCH_OPTIONS_VERSION, GIT_REMOTE_CALLBACKS_INIT, GIT_FETCH_PRUNE_UNSPECIFIED, 1, \
- GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT }
+#define GIT_FETCH_OPTIONS_INIT { \
+ GIT_FETCH_OPTIONS_VERSION, \
+ GIT_REMOTE_CALLBACKS_INIT, \
+ GIT_FETCH_PRUNE_UNSPECIFIED, \
+ GIT_REMOTE_UPDATE_FETCHHEAD, \
+ GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, \
+ GIT_PROXY_OPTIONS_INIT }
/**
* Initialize git_fetch_options structure
@@ -830,6 +845,11 @@ typedef struct {
* Extra headers for this push operation
*/
git_strarray custom_headers;
+
+ /**
+ * "Push options" to deliver to the remote.
+ */
+ git_strarray remote_push_options;
} git_push_options;
#define GIT_PUSH_OPTIONS_VERSION 1
@@ -1001,7 +1021,7 @@ GIT_EXTERN(int) git_remote_upload(
* the name of the remote (or its url, for in-memory remotes). This
* parameter is ignored when pushing.
* @param callbacks pointer to the callback structure to use or NULL
- * @param update_fetchhead whether to write to FETCH_HEAD. Pass 1 to behave like git.
+ * @param update_flags the git_remote_update_flags for these tips.
* @param download_tags what the behaviour for downloading tags is for this fetch. This is
* ignored for push. This must be the same value passed to `git_remote_download()`.
* @return 0 or an error code
@@ -1009,7 +1029,7 @@ GIT_EXTERN(int) git_remote_upload(
GIT_EXTERN(int) git_remote_update_tips(
git_remote *remote,
const git_remote_callbacks *callbacks,
- int update_fetchhead,
+ unsigned int update_flags,
git_remote_autotag_option_t download_tags,
const char *reflog_message);