remote: add prune option to fetch

Add a prune setting in the fetch options to allow to fall back to the
configuration (the default) or to set it on or off.
This commit is contained in:
Carlos Martín Nieto
2015-05-13 09:46:36 +02:00
parent 22261344de
commit 6fb373a0e8
2 changed files with 31 additions and 1 deletions
+20
View File
@@ -505,6 +505,21 @@ GIT_EXTERN(int) git_remote_init_callbacks(
git_remote_callbacks *opts,
unsigned int version);
typedef enum {
/**
* Use the setting from the configuration
*/
GIT_FETCH_PRUNE_FALLBACK,
/**
* Force pruning on
*/
GIT_FETCH_PRUNE,
/**
* Force pruning off
*/
GIT_FETCH_NO_PRUNE,
} git_fetch_prune_t;
typedef struct {
int version;
@@ -512,6 +527,11 @@ typedef struct {
* Callbacks to use for this fetch operation
*/
git_remote_callbacks callbacks;
/**
* Whether to perform a prune after the fetch
*/
git_fetch_prune_t prune;
} git_fetch_options;
#define GIT_FETCH_OPTIONS_VERSION 1