fetch: Future-proof initialization of a refspec on stack

The open-coded version to initialize each and every member will break
when a new member is added to the structure.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Andreas Gruenbacher 2010-03-12 23:27:33 +01:00 коммит произвёл Junio C Hamano
Родитель aac1d7b889
Коммит 8da61a2ab4
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -104,10 +104,8 @@ static void add_merge_config(struct ref **head,
* there is no entry in the resulting FETCH_HEAD marked
* for merging.
*/
memset(&refspec, 0, sizeof(refspec));
refspec.src = branch->merge[i]->src;
refspec.dst = NULL;
refspec.pattern = 0;
refspec.force = 0;
get_fetch_map(remote_refs, &refspec, tail, 1);
for (rm = *old_tail; rm; rm = rm->next)
rm->merge = 1;