summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2012-10-18 04:31:03 +0200
committerCarlos Martín Nieto <cmn@elego.de>2012-10-18 04:31:03 +0200
commitf0d2ddbbf86ee9a3fdb0b882077a6792d5fb5d7f (patch)
tree116133f7379f2232fa5744247ce7b21b7324f455 /include/git2/remote.h
parent4c47a8bcfe03c42096b74d4af06ab95fb95fd211 (diff)
downloadlibgit2-f0d2ddbbf86ee9a3fdb0b882077a6792d5fb5d7f.tar.gz
remote: support fetch cancelation
Introduce git_remote_stop() which sets a variable that is checked by the fetch process in a few key places. If this is variable is set, the fetch is aborted.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index a40daec81..6471acc6a 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -199,6 +199,14 @@ GIT_EXTERN(int) git_remote_download(git_remote *remote, git_off_t *bytes, git_in
GIT_EXTERN(int) git_remote_connected(git_remote *remote);
/**
+ * Cancel the operation
+ *
+ * At certain points in its operation, the network code checks whether
+ * the operation has been cancelled and if so stops the operation.
+ */
+GIT_EXTERN(void) git_remote_stop(git_remote *remote);
+
+/**
* Disconnect from the remote
*
* Close the connection to the remote and free the underlying