anchor.diff:    stream_out(Port, Sock),
     
     % close connection
  +  ok = gen_tcp:close(Sock).
  +
  +handle_upload_pack_nosuchrepo(Sock, Repo) ->
  +  io:format("no such repo: ~p~n", [Repo]),
     ok = gen_tcp:close(Sock).
   
   gather_out(Port) ->
  
positive.code:   end.
    
  handle_upload_pack(Sock, MethodSpec) ->
    % extract and normalize the repo path
    {ok, Path} = extract_repo_path(MethodSpec),
    {ok, NormalizedPath} = normalize_path(Path),
    
    % make the port
    Command = "git upload-pack /Users/tom/dev/sandbox/git/" ++ NormalizedPath,
    Port = open_port({spawn, Command}, []),
    
    % the initial output from git-upload-pack lists the SHA1s of each head.
  
negative.code:   [Name | _RestParts] = Parts,
    SafeName = Name ++ Name,
    [A, B, C | _RestName] = SafeName,
    {ok, string:join([[A], [B], [C]] ++ Parts, "/")}.
    
  file_exists(FullPath) ->
    case file:read_file_info(FullPath) of
      {ok, _Info} ->
        true;
      {error, _Reason} ->
        false
    end.