1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 02:56:12 +02:00

get_remote_group(): use skip_prefix()

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty 2015-07-28 23:08:21 +02:00 committed by Junio C Hamano
parent 5f65499fa2
commit bc598c32ae

View File

@ -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");