Subject: Re: [PATCH 1/1] xdiff: provide indirection to git functions

From: Junio C Hamano <[email-masked]>
Date: Thu, 17 Feb 2022 09:32:05 -0800

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> ...
> If it's XDL_BUG() the primary project (git.git) needs to carry the
> XDL_BUG() -> BUG() shim along with libgit2's XDL_BUG() ->
> GIT_ASSERT(msg) .
>
> If it's just BUG() we don't need the shim in git.git, but you'll need a
> BUG() -> GIT_ASSERT(msg).
>
> I don't see the benefit of requiring two shims instead of one, both in
> terms of code, and the readability of the codebase in git.git
> (i.e. grepping for "git grep -w BUG" or whatever, then remembering it's
> prefixing everything...).

Renaming symbols with preprocessor macro "#define"s, without forcing
people to change the names they have used in the code and have to
write in the future, sounds like a sensible direction to go in.

Thanks.