@@ -1272,22 +1272,21 @@ static int dry_run_commit(int argc, const char **argv, const char *prefix,
12721272 return commitable ? 0 : 1 ;
12731273}
12741274
1275- static int parse_status_slot (const char * var , int offset )
1275+ static int parse_status_slot (const char * slot )
12761276{
1277- if (!strcasecmp (var + offset , "header" ))
1277+ if (!strcasecmp (slot , "header" ))
12781278 return WT_STATUS_HEADER ;
1279- if (!strcasecmp (var + offset , "branch" ))
1279+ if (!strcasecmp (slot , "branch" ))
12801280 return WT_STATUS_ONBRANCH ;
1281- if (!strcasecmp (var + offset , "updated" )
1282- || !strcasecmp (var + offset , "added" ))
1281+ if (!strcasecmp (slot , "updated" ) || !strcasecmp (slot , "added" ))
12831282 return WT_STATUS_UPDATED ;
1284- if (!strcasecmp (var + offset , "changed" ))
1283+ if (!strcasecmp (slot , "changed" ))
12851284 return WT_STATUS_CHANGED ;
1286- if (!strcasecmp (var + offset , "untracked" ))
1285+ if (!strcasecmp (slot , "untracked" ))
12871286 return WT_STATUS_UNTRACKED ;
1288- if (!strcasecmp (var + offset , "nobranch" ))
1287+ if (!strcasecmp (slot , "nobranch" ))
12891288 return WT_STATUS_NOBRANCH ;
1290- if (!strcasecmp (var + offset , "unmerged" ))
1289+ if (!strcasecmp (slot , "unmerged" ))
12911290 return WT_STATUS_UNMERGED ;
12921291 return -1 ;
12931292}
@@ -1327,13 +1326,12 @@ static int git_status_config(const char *k, const char *v, void *cb)
13271326 }
13281327 if (skip_prefix (k , "status.color." , & slot_name ) ||
13291328 skip_prefix (k , "color.status." , & slot_name )) {
1330- int slot = parse_status_slot (k , slot_name - k );
1329+ int slot = parse_status_slot (slot_name );
13311330 if (slot < 0 )
13321331 return 0 ;
13331332 if (!v )
13341333 return config_error_nonbool (k );
1335- color_parse (v , k , s -> color_palette [slot ]);
1336- return 0 ;
1334+ return color_parse (v , s -> color_palette [slot ]);
13371335 }
13381336 if (!strcmp (k , "status.relativepaths" )) {
13391337 s -> relative_paths = git_config_bool (k , v );
0 commit comments