remote: Assert proper GIT_DIRECTION_XXXX values

This commit is contained in:
nulltoken 2013-08-21 13:16:17 +02:00
parent ba7cc8d2f7
commit b83c92dd6f

View File

@ -534,6 +534,8 @@ const char* git_remote__urlfordirection(git_remote *remote, int direction)
{ {
assert(remote); assert(remote);
assert(direction == GIT_DIRECTION_FETCH || direction == GIT_DIRECTION_PUSH);
if (direction == GIT_DIRECTION_FETCH) { if (direction == GIT_DIRECTION_FETCH) {
return remote->url; return remote->url;
} }