-
- Downloads
There was an error fetching the commit references. Please try again later.
objectpool: Refactor reading alternates file
Both `objectpool.FromRepo()` and `objectpool.LinkedToRepository()` use `getAlternateObjectDir()` to read the alternates file. Refactor the code to use `stats.AlternatesInfoForRepository()` instead because it is more robust and simplifies error handling. The only behavior change is that `objectpool.FromRepo()` is slightly more strict and returns an error if a repository contains an empty alternates file. Previously it would only return an error if the alternates file was missing or malformed. An empty alternates file should be treated as invalid and return an error in the same manner.
Please register or sign in to comment