]> git.ipfire.org Git - thirdparty/git.git/commit - commit-graph.c
commit-graph: unify the signatures of all write_graph_chunk_*() functions
authorSZEDER Gábor <szeder.dev@gmail.com>
Wed, 1 Jul 2020 13:27:25 +0000 (13:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Jul 2020 21:17:43 +0000 (14:17 -0700)
commit9bab081dfab8ebb4fcdf0d7e8a692626aeb29358
tree4a7480fcc14ea2e22eefe6bc9f3a28ec1396bf9c
parent0087a87ba8fc69b27dde0183ec24ade367a4aa5b
commit-graph: unify the signatures of all write_graph_chunk_*() functions

Update the write_graph_chunk_*() helper functions to have the same
signature:

  - Return an int error code from all these functions.
    write_graph_chunk_base() already has an int error code, now the
    others will have one, too, but since they don't indicate any
    error, they will always return 0.

  - Drop the hash size parameter of write_graph_chunk_oids() and
    write_graph_chunk_data(); its value can be read directly from
    'the_hash_algo' inside these functions as well.

This opens up the possibility for further cleanups and foolproofing in
the following two patches.

Helped-by: René Scharfe <l.s.r@web.de>
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c