Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2010-03-13 01:27:33 +0300
committerJunio C Hamano <gitster@pobox.com>2010-03-20 19:27:17 +0300
commit8da61a2ab48175526390233c8bcedf63a3cdb6c4 (patch)
tree666b4f822a943fe70ef1b07f1cfd7e637f7f5b54 /builtin-fetch.c
parentaac1d7b88918f39b1b7c5bc0dcf831dcc9d5d8a8 (diff)
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>
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r--builtin-fetch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 0acf80991b..8dd1adf849 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -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;