@@ -1269,7 +1269,7 @@ static int config_parse(git_strmap *values, diskfile_backend *cfg_file, struct r
1269
1269
if ((result = git_path_dirname_r (& path , reader -> file_path )) < 0 )
1270
1270
break ;
1271
1271
1272
- /* We need to know out index in the array, as the next config_parse call may realloc */
1272
+ /* We need to know our index in the array, as the next config_parse call may realloc */
1273
1273
index = git_array_size (cfg_file -> readers ) - 1 ;
1274
1274
dir = git_buf_detach (& path );
1275
1275
result = included_path (& path , dir , var -> entry -> value );
@@ -1280,12 +1280,18 @@ static int config_parse(git_strmap *values, diskfile_backend *cfg_file, struct r
1280
1280
1281
1281
r -> file_path = git_buf_detach (& path );
1282
1282
git_buf_init (& r -> buffer , 0 );
1283
- if ((result = git_futils_readbuffer_updated (& r -> buffer , r -> file_path , & r -> file_mtime ,
1284
- & r -> file_size , NULL )) < 0 )
1285
- break ;
1283
+ result = git_futils_readbuffer_updated (& r -> buffer , r -> file_path , & r -> file_mtime ,
1284
+ & r -> file_size , NULL );
1285
+
1286
+ if (result == 0 ) {
1287
+ result = config_parse (values , cfg_file , r , level , depth + 1 );
1288
+ r = git_array_get (cfg_file -> readers , index );
1289
+ }
1290
+ else if (result == GIT_ENOTFOUND ) {
1291
+ giterr_clear ();
1292
+ result = 0 ;
1293
+ }
1286
1294
1287
- result = config_parse (values , cfg_file , r , level , depth + 1 );
1288
- r = git_array_get (cfg_file -> readers , index );
1289
1295
git_buf_free (& r -> buffer );
1290
1296
1291
1297
if (result < 0 )
0 commit comments