diff options
Diffstat (limited to 'fetch-pack.c')
-rw-r--r-- | fetch-pack.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 058c25837..84d5a6696 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -555,9 +555,8 @@ static void filter_refs(struct fetch_pack_args *args, continue; ref->matched = 1; - *newtail = ref; - ref->next = NULL; - newtail = &ref->next; + *newtail = copy_ref(ref); + newtail = &(*newtail)->next; } } *refs = newlist; |