diff options
author | Jeff King <peff@peff.net> | 2016-07-05 16:44:47 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-06 10:11:08 -0700 |
commit | 023ff39b2994804e4a7b2274b22336bdb37d4a54 (patch) | |
tree | 961ed842c71e0b8ba81b00b1212f613fd759c781 /diff-delta.c | |
parent | Git 2.8.4 (diff) | |
download | tgif-023ff39b2994804e4a7b2274b22336bdb37d4a54.tar.xz |
parse_options: allocate a new array when concatenating
In exactly one callers (builtin/revert.c), we build up the
options list dynamically from multiple arrays. We do so by
manually inserting "filler" entries into one array, and then
copying the other array into the allocated space.
This is tedious and error-prone, as you have to adjust the
filler any time the second array is modified (although we do
at least check and die() when the counts do not match up).
Instead, let's just allocate a new array.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-delta.c')
0 files changed, 0 insertions, 0 deletions