def handle_pack(pack_type, io_in, io_out, opts = {})
      args = %w{--stateless-rpc}
      if opts.fetch(:advertise_refs, false)
        io_out.write(advertisement_prefix(pack_type))
        args << '--advertise-refs'
      end
      args << repository_path.to_s
      command(pack_type.sub(/^git-/, ''), args, io_in, io_out)
    end
def handle_pack(pack_type, io_in, io_out, opts = {})
      args = %w{--stateless-rpc}
      if opts.fetch(:advertise_refs, false)
        io_out.write(advertisement_prefix(pack_type))
        args << '--advertise-refs'
      end
      args << repository_path.to_s
      command(pack_type.sub(/^git-/, ''), args, io_in, io_out)
    end
Process the pack file exchange protocol.

 @param [String] pack_type the type of pack exchange to perform.
 @param [#read] io_in a readable, IO-like object providing client input
   data.
 @param [#write] io_out a writable, IO-like object sending output data to
   the client.
 @param [Hash] opts options to pass to the Git adapter's #handle_pack
   method.
 @option opts [Boolean] :advertise_refs (false)