refspec: consolidate ref-prefix generation logic
authorBrandon Williams <bmwill@google.com>
Wed, 16 May 2018 23:48:21 +0000 (16:48 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 May 2018 21:35:35 +0000 (06:35 +0900)
When using protocol v2 a client constructs a list of ref-prefixes which
are sent across the wire so that the server can do server-side filtering
of the ref-advertisement. The logic that does this exists for both
fetch and push (even though no push support for v2 currently exists yet)
and is roughly the same so lets consolidate this logic and make it
general enough that it can be used for both the push and fetch cases.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found