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>
This commit is contained in:

committed by
Shawn O. Pearce

parent
2b5a06edca
commit
2467a4fa03
5
remote.h
5
remote.h
@ -49,6 +49,11 @@ struct ref *alloc_ref(unsigned namelen);
|
||||
*/
|
||||
void free_refs(struct ref *ref);
|
||||
|
||||
/*
|
||||
* Removes and frees any duplicate refs in the map.
|
||||
*/
|
||||
void ref_remove_duplicates(struct ref *ref_map);
|
||||
|
||||
struct refspec *parse_ref_spec(int nr_refspec, const char **refspec);
|
||||
|
||||
int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail,
|
||||
|
Reference in New Issue
Block a user