aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-10-30 10:09:06 -0700
committerJunio C Hamano <gitster@pobox.com>2009-10-31 14:25:15 -0700
commit76fd28283f7eeea246a06994edd43ab60e59d853 (patch)
tree18b463d6fe1c5bfd0ea204e2fd28c31ff83514ac /t
parenta4ca1465ec8afee798bf8f11d727179ca3da64a9 (diff)
downloadgit-76fd28283f7eeea246a06994edd43ab60e59d853.tar.gz
git-76fd28283f7eeea246a06994edd43ab60e59d853.tar.xz
diff --color-words: bit of clean-up
When we introduced the "word diff" mode, we could have done one of three things: * change fn_out_consume() to "this is called every time a line worth of diff becomes ready from the lower-level diff routine. This function knows two sets of helpers (one for line-oriented diff, another for word diff), and each set has various functions to be called at certain places (e.g. hunk header, context, ...). The function's role is to inspect the incoming line, and dispatch appropriate helpers to produce either line- or word- oriented diff output." * introduce fn_out_consume_word_diff() that is "this is called every time a line worth of diff becomes ready from the lower-level diff routine, and here is what we do to prepare word oriented diff using that line." without touching fn_out_consume() at all. * Do neither of the above, and keep fn_out_consume() to "this is called every time a line worth of diff becomes ready from the lower-level diff routine, and here is what we do to output line oriented diff using that line." but sprinkle a handful of 'are we in word-diff mode? if so do this totally different thing' at random places. This patch is to at least abstract the details of "this totally different thing" out from the main codepath, in order to improve readability. We can later refactor it by introducing fn_out_consume_word_diff(), taking the second route above, but that is a separate topic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions