builtin/apply: move 'fn_table' global into 'struct apply_state'
commit71dac5cef57daacb35a56b4b54e1a30bc6417968
authorChristian Couder <christian.couder@gmail.com>
Tue, 24 May 2016 08:11:21 +0000 (24 10:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Jun 2016 17:10:16 +0000 (1 10:10 -0700)
tree3d5f76cc0876b984242cf8ffef7e077e6ad2c015
parentd7263d097c4510d864f8c9ff808bc9b377f0bf8f
builtin/apply: move 'fn_table' global into 'struct apply_state'

To libify the apply functionality the 'fn_table' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.

As fn_table is cleared at the end of apply_patch(), it is not
necessary to clear it in clear_apply_state().

Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/apply.c