@@ -1238,22 +1238,21 @@ static int dry_run_commit(int argc, const char **argv, const char *prefix,
12381238 return commitable ? 0 : 1 ;
12391239}
12401240
1241- static int parse_status_slot (const char * var , int offset )
1241+ static int parse_status_slot (const char * slot )
12421242{
1243- if (!strcasecmp (var + offset , "header" ))
1243+ if (!strcasecmp (slot , "header" ))
12441244 return WT_STATUS_HEADER ;
1245- if (!strcasecmp (var + offset , "branch" ))
1245+ if (!strcasecmp (slot , "branch" ))
12461246 return WT_STATUS_ONBRANCH ;
1247- if (!strcasecmp (var + offset , "updated" )
1248- || !strcasecmp (var + offset , "added" ))
1247+ if (!strcasecmp (slot , "updated" ) || !strcasecmp (slot , "added" ))
12491248 return WT_STATUS_UPDATED ;
1250- if (!strcasecmp (var + offset , "changed" ))
1249+ if (!strcasecmp (slot , "changed" ))
12511250 return WT_STATUS_CHANGED ;
1252- if (!strcasecmp (var + offset , "untracked" ))
1251+ if (!strcasecmp (slot , "untracked" ))
12531252 return WT_STATUS_UNTRACKED ;
1254- if (!strcasecmp (var + offset , "nobranch" ))
1253+ if (!strcasecmp (slot , "nobranch" ))
12551254 return WT_STATUS_NOBRANCH ;
1256- if (!strcasecmp (var + offset , "unmerged" ))
1255+ if (!strcasecmp (slot , "unmerged" ))
12571256 return WT_STATUS_UNMERGED ;
12581257 return -1 ;
12591258}
@@ -1291,13 +1290,12 @@ static int git_status_config(const char *k, const char *v, void *cb)
12911290 return 0 ;
12921291 }
12931292 if (starts_with (k , "status.color." ) || starts_with (k , "color.status." )) {
1294- int slot = parse_status_slot (k , 13 );
1293+ int slot = parse_status_slot (k + 13 );
12951294 if (slot < 0 )
12961295 return 0 ;
12971296 if (!v )
12981297 return config_error_nonbool (k );
1299- color_parse (v , k , s -> color_palette [slot ]);
1300- return 0 ;
1298+ return color_parse (v , s -> color_palette [slot ]);
13011299 }
13021300 if (!strcmp (k , "status.relativepaths" )) {
13031301 s -> relative_paths = git_config_bool (k , v );
0 commit comments