summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorLibravatar Thomas Gummerer <t.gummerer@gmail.com>2019-07-11 17:08:43 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-11 14:29:27 -0700
commit80e184123202761a4be32be12be12f7ff469fe5b (patch)
tree1609c52181587d85dee44e883b442898414695f1 /utf8.c
parentapply: only pass required data to find_name_* (diff)
downloadtgif-80e184123202761a4be32be12be12f7ff469fe5b.tar.xz
apply: only pass required data to gitdiff_* functions
Currently the 'gitdiff_*()' functions take 'struct apply_state' as parameter, even though they only needs the root, linenr and p_value from that struct. These functions are in the callchain of 'parse_git_header()', which we want to make more generally useful in a subsequent commit. To make that happen we only want to pass in the required data to 'parse_git_header()', and not the whole 'struct apply_state', and thus we want functions in the callchain of 'parse_git_header()' to only take arguments they really need. As these functions are called in a loop using their function pointers, each function needs to be passed all the parameters even if only one of the functions actually needs it. We therefore pass this data along in a struct to avoid adding too many unused parameters to each function and making the code very verbose in the process. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'utf8.c')
0 files changed, 0 insertions, 0 deletions