factor out BARF_UNLESS_COPYABLE
commit1891846fa4d439be7f9a1a32c062f62cd863df2b
authorRené Scharfe <l.s.r@web.de>
Sun, 1 Jan 2023 21:08:53 +0000 (1 22:08 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jan 2023 04:28:36 +0000 (9 13:28 +0900)
treea7baeaf608447edec019f9a7dea2e7d5d6dba0b3
parent09884f352eb36cf2579d819595e9b7e1656a28b6
factor out BARF_UNLESS_COPYABLE

Move the common basic element type check of COPY_ARRAY and MOVE_ARRAY to
a new macro.  This reduces code duplication and simplifies adding more
elaborate checks.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h