| 857 | } |
| 858 | |
| 859 | int read_repository_format(struct repository_format *format, const char *path) |
| 860 | { |
| 861 | clear_repository_format(format); |
| 862 | format->hash_algo = GIT_HASH_SHA1_LEGACY; |
| 863 | git_config_from_file(check_repo_format, path, format); |
| 864 | if (format->version == -1) { |
| 865 | clear_repository_format(format); |
| 866 | format->hash_algo = GIT_HASH_SHA1_LEGACY; |
| 867 | } |
| 868 | return format->version; |
| 869 | } |
| 870 | |
| 871 | void clear_repository_format(struct repository_format *format) |
| 872 | { |
no test coverage detected