remote-curl: pass buffer straight to get_remote_heads