• Jeff King's avatar
    send-pack: take refspecs over stdin · 26be19ba
    Jeff King authored
    Pushing a large number of refs works over most transports,
    because we implement send-pack as an internal function.
    However, it can sometimes fail when pushing over http,
    because we have to spawn "git send-pack --stateless-rpc" to
    do the heavy lifting, and we pass each refspec on the
    command line. This can cause us to overflow the OS limits on
    the size of the command line for a large push.
    We can solve this by giving send-pack a --stdin option and
    using it from remote-curl.  We already dealt with this on
    the fetch-pack side in 078b895f (fetch-pack: new --stdin
    option to read refs from stdin, 2012-04-02). The stdin
    option (and in particular, its use of packet-lines for
    stateless-rpc input) is modeled after that solution.
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
t5408-send-pack-stdin.sh 1.9 KB