Re: [PATCH 1/1] xdiff: provide indirection to git functions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 17, 2022, 17:32 UTC
- Message-ID
- <xmqqfsohbdre.fsf@gitster.g>
- In-Reply-To
- <220217.86ee41izpq.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 12 quoted lines
> ... > 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.