Skip to content

Commit

Permalink
get_remote_group(): use skip_prefix()
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Jul 28, 2015
1 parent 5f65499 commit bc598c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,7 @@ static int get_remote_group(const char *key, const char *value, void *priv)
{
struct remote_group_data *g = priv;

if (starts_with(key, "remotes.") &&
!strcmp(key + 8, g->name)) {
if (skip_prefix(key, "remotes.", &key) && !strcmp(key, g->name)) {
/* split list by white space */
while (*value) {
size_t wordlen = strcspn(value, " \t\n");
Expand Down

0 comments on commit bc598c3

Please sign in to comment.