Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better error messages for upload_pack

  • Loading branch information...
commit 2ff8cba9ada7fc1224b037056c54cb4e4e99b7ac 1 parent f70cfc7
@mojombo authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  elibs/upload_pack.erl
View
3  elibs/upload_pack.erl
@@ -33,6 +33,7 @@ convert_path(Sock, Host, Path) ->
repo_existence(Sock, Host, Path, FullPath);
{error, nomatch} ->
error_logger:info_msg("no repo match: ~p~n", [Path]),
+ gen_tcp:send(Sock, "003b\n*********'\n\nNo matching repositories found.\n\n*********"),
ok = gen_tcp:close(Sock)
end.
@@ -43,6 +44,7 @@ repo_existence(Sock, Host, Path, FullPath) ->
export_ok(Sock, Host, Path, FullPath);
false ->
error_logger:info_msg("no such repo: ~p~n", [FullPath]),
+ gen_tcp:send(Sock, "003b\n*********'\n\nNo matching repositories found.\n\n*********"),
ok = gen_tcp:close(Sock)
end.
@@ -54,6 +56,7 @@ export_ok(Sock, Host, Path, FullPath) ->
make_port(Sock, Host, Path, FullPath);
false ->
error_logger:info_msg("permission denied to repo: ~p~n", [FullPath]),
+ gen_tcp:send(Sock, "0048\n*********'\n\nPermission denied. Repository is not public.\n\n*********"),
ok = gen_tcp:close(Sock)
end.
Please sign in to comment.
Something went wrong with that request. Please try again.