summaryrefslogtreecommitdiff
path: root/builtin-fetch.c
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2007-10-08 00:25:07 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-10-15 20:28:06 -0400
commit2467a4fa03ff849fcf2f6a93b89057aebd49c62b (patch)
treefc6ff162d3b6ca5680483f8ef714934aae8e484f /builtin-fetch.c
parent2b5a06edca8f7237aad6464b349b79772024d2a2 (diff)
downloadgit-2467a4fa03ff849fcf2f6a93b89057aebd49c62b.tar.gz
Remove duplicate ref matches in fetch
If multiple refspecs matched the same ref, the update would be processed multiple times. Now having the same destination for the same source has no additional effect, and having the same destination for different sources is an error. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r--builtin-fetch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c
index cf7498b15f..caaca63644 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -112,6 +112,7 @@ static struct ref *get_ref_map(struct transport *transport,
ref_map->merge = 1;
}
}
+ ref_remove_duplicates(ref_map);
return ref_map;
}