summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-21 23:04:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-21 23:04:35 (GMT)
commit470bbbc4dc6a135fd08083c1bd87699ac1b3f742 (patch)
tree897b6d17e241c2bebfdf6f518ed1e7f8d4a4cd24 /remote.c
parent1020fbc2485d6c1c144d321b68fcf37269e67917 (diff)
parent29753cddc8007ac63754855d026fe5eca8897d04 (diff)
downloadgit-470bbbc4dc6a135fd08083c1bd87699ac1b3f742.zip
git-470bbbc4dc6a135fd08083c1bd87699ac1b3f742.tar.gz
git-470bbbc4dc6a135fd08083c1bd87699ac1b3f742.tar.bz2
Merge branch 'jc/match-refs-clarify'
* jc/match-refs-clarify: rename "match_refs()" to "match_push_refs()" send-pack: typofix error message
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/remote.c b/remote.c
index e52aa9b..2f62c9a 100644
--- a/remote.c
+++ b/remote.c
@@ -1145,12 +1145,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;