diff options
author | Daniel Barkalow <barkalow@iabervon.org> | 2007-10-08 00:25:07 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-10-15 20:28:06 -0400 |
commit | 2467a4fa03ff849fcf2f6a93b89057aebd49c62b (patch) | |
tree | fc6ff162d3b6ca5680483f8ef714934aae8e484f /remote.h | |
parent | 2b5a06edca8f7237aad6464b349b79772024d2a2 (diff) | |
download | git-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 'remote.h')
-rw-r--r-- | remote.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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, |