cmd_fetch_pack(): respect constness of argv parameter
commit57e6fc69588ea5e1b6a151d60f2cf9fa636251c1
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 21 May 2012 07:59:59 +0000 (21 09:59 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 22 May 2012 19:57:20 +0000 (22 12:57 -0700)
tree0b3c4dff7120c7429f3a99f1a714f8343ff139af
parentff22ff9909a09d775c740f31443f96edd5b5e006
cmd_fetch_pack(): respect constness of argv parameter

The old code cast away the constness of the strings passed to the
function in argument argv[], which could result in their being
modified by filter_refs().  Fix by copying reference names from argv
and putting them into our own array (similarly to how refnames passed
to stdin were already handled).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c