diff: refactor the word-diff setup from builtin_diff_cmd
authorThomas Rast <trast@student.ethz.ch>
Wed, 14 Mar 2012 18:24:08 +0000 (19:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Mar 2012 21:40:15 +0000 (14:40 -0700)
commit77d1a520fb5b8ad8cc86228023f16a44b75c05d1
tree05bb8775ec71e23bdb1e46776d278fc250c564b3
parent62d39359af1a46de68b600c0dc73a98b78aa5523
diff: refactor the word-diff setup from builtin_diff_cmd

Quite a chunk of builtin_diff_cmd deals with word-diff setup, defaults
and such.  This makes the function a bit hard to read, but is also
asymmetric because the corresponding teardown lives in free_diff_words_data
already.

Refactor into a new function init_diff_words_data.  For simplicity,
also shuffle around some functions it depends on.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c