summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-06-27 20:23:47 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-06-27 20:23:47 +0200
commit0ac2726fdf945792028e59105d8630a91c5d3663 (patch)
tree29d40edaa6c723c3a8b2f82e81608168c224949c /include
parent5da5321d1753ed897a2597e4ad7ff1928aa7cbbc (diff)
downloadlibgit2-0ac2726fdf945792028e59105d8630a91c5d3663.tar.gz
Slim down git_transport
Remove the unused repo and private pointers and make the direction a flag, as it can only have two states. Change the connect signature to use an int instead of git_net_direction and remove that enum. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include')
-rw-r--r--include/git2/net.h6
-rw-r--r--include/git2/remote.h2
-rw-r--r--include/git2/transport.h2
3 files changed, 4 insertions, 6 deletions
diff --git a/include/git2/net.h b/include/git2/net.h
index fb09eb508..4bef90509 100644
--- a/include/git2/net.h
+++ b/include/git2/net.h
@@ -13,10 +13,8 @@
* gets called.
*/
-enum git_net_direction {
- INTENT_PUSH,
- INTENT_PULL
-};
+#define GIT_DIR_FETCH 0
+#define GIT_DIR_PUSH 1
/*
* This is what we give out on ->ls()
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 9a988f36c..03e459569 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -64,7 +64,7 @@ GIT_EXTERN(const git_refspec *) git_remote_fetchspec(struct git_remote *remote);
* @param remote the remote to connect to
* @return GIT_SUCCESS or an error code
*/
-GIT_EXTERN(int) git_remote_connect(struct git_remote *remote, git_net_direction dir);
+GIT_EXTERN(int) git_remote_connect(struct git_remote *remote, int direction);
/**
* Get a list of refs at the remote
diff --git a/include/git2/transport.h b/include/git2/transport.h
index 01883f2ca..982b081f8 100644
--- a/include/git2/transport.h
+++ b/include/git2/transport.h
@@ -45,7 +45,7 @@ GIT_BEGIN_DECL
*/
GIT_EXTERN(int) git_transport_new(git_transport **transport, const char *url);
-GIT_EXTERN(int) git_transport_connect(git_transport *transport, git_net_direction direction);
+GIT_EXTERN(int) git_transport_connect(git_transport *transport, int direction);
GIT_EXTERN(int) git_transport_ls(git_transport *transport, git_headarray *array);
GIT_EXTERN(int) git_transport_close(git_transport *transport);