@@ -1238,22 +1238,21 @@ static int dry_run_commit(int argc, const char **argv, const char *prefix,
1238
1238
return commitable ? 0 : 1 ;
1239
1239
}
1240
1240
1241
- static int parse_status_slot (const char * var , int offset )
1241
+ static int parse_status_slot (const char * slot )
1242
1242
{
1243
- if (!strcasecmp (var + offset , "header" ))
1243
+ if (!strcasecmp (slot , "header" ))
1244
1244
return WT_STATUS_HEADER ;
1245
- if (!strcasecmp (var + offset , "branch" ))
1245
+ if (!strcasecmp (slot , "branch" ))
1246
1246
return WT_STATUS_ONBRANCH ;
1247
- if (!strcasecmp (var + offset , "updated" )
1248
- || !strcasecmp (var + offset , "added" ))
1247
+ if (!strcasecmp (slot , "updated" ) || !strcasecmp (slot , "added" ))
1249
1248
return WT_STATUS_UPDATED ;
1250
- if (!strcasecmp (var + offset , "changed" ))
1249
+ if (!strcasecmp (slot , "changed" ))
1251
1250
return WT_STATUS_CHANGED ;
1252
- if (!strcasecmp (var + offset , "untracked" ))
1251
+ if (!strcasecmp (slot , "untracked" ))
1253
1252
return WT_STATUS_UNTRACKED ;
1254
- if (!strcasecmp (var + offset , "nobranch" ))
1253
+ if (!strcasecmp (slot , "nobranch" ))
1255
1254
return WT_STATUS_NOBRANCH ;
1256
- if (!strcasecmp (var + offset , "unmerged" ))
1255
+ if (!strcasecmp (slot , "unmerged" ))
1257
1256
return WT_STATUS_UNMERGED ;
1258
1257
return -1 ;
1259
1258
}
@@ -1291,13 +1290,12 @@ static int git_status_config(const char *k, const char *v, void *cb)
1291
1290
return 0 ;
1292
1291
}
1293
1292
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 );
1295
1294
if (slot < 0 )
1296
1295
return 0 ;
1297
1296
if (!v )
1298
1297
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 ]);
1301
1299
}
1302
1300
if (!strcmp (k , "status.relativepaths" )) {
1303
1301
s -> relative_paths = git_config_bool (k , v );
0 commit comments