On 13/11/2018 18:42, Derrick Stolee wrote: > On 11/4/2018 6:44 PM, brian m. carlson wrote: >> +int hash_algo_by_name(const char *name) >> +{ >> + int i; >> + if (!name) >> + return GIT_HASH_UNKNOWN; >> + for (i = 1; i < GIT_HASH_NALGOS; i++) >> + if (!strcmp(name, hash_algos[i].name)) >> + return i; >> + return GIT_HASH_UNKNOWN; >> +} >> + > > Today's test coverage report [1] shows this method is not covered in the test > suite. Looking at 'pu', it doesn't have any callers. > > Do you have a work in progress series that will use this? Could we add a > test-tool to exercise this somehow? There are actually 4 unused external symbols resulting from Brian's 'bc/sha-256' branch. The new unused externals in 'pu' looks like: $ diff nsc psc 37a38,39 > hex.o - hash_to_hex > hex.o - hash_to_hex_algop_r 48a51 > parse-options.o - optname 71a75 > sha1-file.o - for_each_file_in_obj_subdir 72a77,78 > sha1-file.o - hash_algo_by_id > sha1-file.o - hash_algo_by_name $ The symbols from hex.o and sha1-file.o being the 4 symbols from this branch. I suspect that upcoming patches will make use of them. ;-) ATB, Ramsay Jones
- [PATCH v4 01/12] sha1-file: rename algorithm to... brian m. carlson
- [PATCH v4 11/12] sha256: add an SHA-256 impleme... brian m. carlson
- [PATCH v5 00/12] Base SHA-256 implementation brian m. carlson
- [PATCH v5 05/12] t: add basic tests for ou... brian m. carlson
- [PATCH v5 04/12] cache: make hashcmp and h... brian m. carlson
- [PATCH v5 03/12] hex: introduce functions ... brian m. carlson
- [PATCH v5 02/12] sha1-file: provide functi... brian m. carlson
- Re: [PATCH v5 02/12] sha1-file: provid... Derrick Stolee
- Re: [PATCH v5 02/12] sha1-file: pr... Duy Nguyen
- Re: [PATCH v5 02/12] sha1-file... brian m. carlson
- Re: [PATCH v5 02/12] sha1-file: pr... Ramsay Jones
- Re: [PATCH v5 02/12] sha1-file... Ramsay Jones
- Re: [PATCH v5 02/12] sha1... Jeff King
- Re: [PATCH v5 02/12] sha1-file... brian m. carlson
- Re: [PATCH v5 02/12] sha1... Ramsay Jones
- [PATCH v5 07/12] sha1-file: add a constant... brian m. carlson
- [PATCH v5 01/12] sha1-file: rename algorit... brian m. carlson
- Re: [PATCH v5 01/12] sha1-file: rename... Ævar Arnfjörð Bjarmason
- [PATCH v5 06/12] t: make the sha1 test-too... brian m. carlson
- [PATCH v5 08/12] t/helper: add a test help... brian m. carlson
- [PATCH v5 09/12] commit-graph: convert to ... brian m. carlson