diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-09 11:54:58 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-12 16:41:53 -0700 |
commit | 29753cddc8007ac63754855d026fe5eca8897d04 (patch) | |
tree | 6dfdf6cae4ff4c1729cf0b8dd400b99d6d494b1a /remote.c | |
parent | e6bcd979684d5a050bcb5d642e761e0ea350c6ec (diff) | |
download | git-29753cddc8007ac63754855d026fe5eca8897d04.tar.gz |
rename "match_refs()" to "match_push_refs()"jc/match-refs-clarify
Yes, there is a warning that says the function is only used by push in big
red letters in front of this function, but it didn't say a more important
thing it should have said: what the function is for and what it does.
Rename it and document it to avoid future confusion.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1170,12 +1170,15 @@ static struct ref **tail_ref(struct ref **head) } /* - * Note. This is used only by "push"; refspec matching rules for - * push and fetch are subtly different, so do not try to reuse it - * without thinking. + * Given the set of refs the local repository has, the set of refs the + * remote repository has, and the refspec used for push, determine + * what remote refs we will update and with what value by setting + * peer_ref (which object is being pushed) and force (if the push is + * forced) in elements of "dst". The function may add new elements to + * dst (e.g. pushing to a new branch, done in match_explicit_refs). */ -int match_refs(struct ref *src, struct ref **dst, - int nr_refspec, const char **refspec, int flags) +int match_push_refs(struct ref *src, struct ref **dst, + int nr_refspec, const char **refspec, int flags) { struct refspec *rs; int send_all = flags & MATCH_REFS_ALL; |