remote.c: hoist branch.*.remote lookup out of remote_get_1

We'll want to use this logic as a fallback when looking up
the pushremote, so let's pull it out into its own function.

We don't technically need to make this available outside of
remote.c, but doing so will provide a consistent API with
pushremote_for_branch, which we will add later.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2015-05-21 00:45:16 -04:00
committed by Junio C Hamano
parent 9e3751d443
commit f052154db3
2 changed files with 15 additions and 7 deletions

View File

@ -211,6 +211,7 @@ struct branch {
};
struct branch *branch_get(const char *name);
const char *remote_for_branch(struct branch *branch, int *explicit);
int branch_has_merge_config(struct branch *branch);
int branch_merge_matches(struct branch *, int n, const char *);