Commit b83c92dd6fe11adae0ff29e1db381c31f0f88cb7

nulltoken 2013-08-21T13:16:17

remote: Assert proper GIT_DIRECTION_XXXX values

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/remote.c b/src/remote.c
index 7677e56..14ed740 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -534,6 +534,8 @@ const char* git_remote__urlfordirection(git_remote *remote, int direction)
 {
 	assert(remote);
 
+	assert(direction == GIT_DIRECTION_FETCH || direction == GIT_DIRECTION_PUSH);
+
 	if (direction == GIT_DIRECTION_FETCH) {
 		return remote->url;
 	}