diff options
author | Christian Couder <christian.couder@gmail.com> | 2016-05-11 15:16:19 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-12 12:21:25 -0700 |
commit | 2fc0f1849bd0d6100719bb53f89f15fbd734157a (patch) | |
tree | 19284f0bdf984f4b06e3e8e4099215be55bfc95d /LGPL-2.1 | |
parent | dcde8b3dcd8d4411a2311fa0a93ca4ca3b26d61f (diff) | |
download | git-2fc0f1849bd0d6100719bb53f89f15fbd734157a.tar.gz git-2fc0f1849bd0d6100719bb53f89f15fbd734157a.tar.xz |
builtin/apply: introduce 'struct apply_state' to start libifying
Currently commands that want to use the apply functionality have to launch
a "git apply" process which can be bad for performance.
Let's start libifying the apply functionality and to do that we first need
to get rid of the global variables in "builtin/apply.c".
This patch introduces "struct apply_state" into which all the previously
global variables will be moved. A new parameter called "state" that is a
pointer to the "apply_state" structure will come at the beginning of the
helper functions that need it and will be passed around the call chain.
To start let's move the "prefix" and "prefix_length" global variables into
"struct 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>
Diffstat (limited to 'LGPL-2.1')
0 files changed, 0 insertions, 0 deletions