aboutsummaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-27 14:57:50 -0800
committerJunio C Hamano <gitster@pobox.com>2013-12-27 14:57:50 -0800
commit7cdebd8a2039cb3ec717b880709ea6dfd824e3c4 (patch)
treef07fff24eb335bc59849625af60378a869f766a8 /remote.c
parent7794a680e63a2a11b73cb1194653662f2769a792 (diff)
parentfc9261ca611080b1dae76b86b3bf5f36d592042f (diff)
downloadgit-7cdebd8a2039cb3ec717b880709ea6dfd824e3c4.tar.gz
git-7cdebd8a2039cb3ec717b880709ea6dfd824e3c4.tar.xz
Merge branch 'jc/push-refmap'
Make "git push origin master" update the same ref that would be updated by our 'master' when "git push origin" (no refspecs) is run while the 'master' branch is checked out, which makes "git push" more symmetric to "git fetch" and more usable for the triangular workflow. * jc/push-refmap: push: also use "upstream" mapping when pushing a single ref push: use remote.$name.push as a refmap builtin/push.c: use strbuf instead of manual allocation
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/remote.c b/remote.c
index 709a9cbd2..a89efab5b 100644
--- a/remote.c
+++ b/remote.c
@@ -852,7 +852,7 @@ static int match_name_with_pattern(const char *key, const char *name,
return ret;
}
-static int query_refspecs(struct refspec *refs, int ref_count, struct refspec *query)
+int query_refspecs(struct refspec *refs, int ref_count, struct refspec *query)
{
int i;
int find_src = !query->src;
@@ -986,9 +986,9 @@ void sort_ref_list(struct ref **l, int (*cmp)(const void *, const void *))
*l = llist_mergesort(*l, ref_list_get_next, ref_list_set_next, cmp);
}
-static int count_refspec_match(const char *pattern,
- struct ref *refs,
- struct ref **matched_ref)
+int count_refspec_match(const char *pattern,
+ struct ref *refs,
+ struct ref **matched_ref)
{
int patlen = strlen(pattern);
struct ref *matched_weak = NULL;