summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinquize <linquize@yahoo.com.hk>2014-09-22 23:17:35 +0800
committerCarlos Martín Nieto <cmn@dwim.me>2014-12-14 17:04:01 +0100
commit5f4739475307665f88ff1d52b35f2b17d3a9b869 (patch)
treeccb99eb847e86c7a473f124927ccba4caa94db8f /include
parent4eb97ef3bf18403fbce351ae4cac673655d2886a (diff)
downloadlibgit2-5f4739475307665f88ff1d52b35f2b17d3a9b869.tar.gz
remote: prune refs when fetching
Diffstat (limited to 'include')
-rw-r--r--include/git2/remote.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 15a8d481f..0d4ee99a0 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -375,6 +375,14 @@ GIT_EXTERN(int) git_remote_update_tips(
const char *reflog_message);
/**
+ * Prune tracking refs that are no longer present on remote
+ *
+ * @param remote the remote to prune
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_remote_prune(git_remote *remote);
+
+/**
* Download new data and update tips
*
* Convenience function to connect to a remote, download the data,
@@ -585,6 +593,24 @@ GIT_EXTERN(void) git_remote_set_autotag(
git_remote_autotag_option_t value);
/**
+ * Retrieve the ref-prune setting
+ *
+ * @param remote the remote to query
+ * @return the ref-prune setting
+ */
+GIT_EXTERN(int) git_remote_prune_refs(const git_remote *remote);
+
+/**
+ * Set the ref-prune setting
+ *
+ * @param remote the remote to configure
+ * @param value a boolean value
+ */
+GIT_EXTERN(void) git_remote_set_prune_refs(
+ git_remote *remote,
+ int value);
+
+/**
* Give the remote a new name
*
* All remote-tracking branches and configuration settings