git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.  
Previous: Ævar Arnfjörð BjarmasonNext: Edward Thomson
Message 9 of 11 in “xdiff: share xdiff between git and libgit2”
  1. 0/1 xdiff: share xdiff between git and libgit2Edward Thomson, Feb 9, 2022
  2. 1/1 xdiff: provide indirection to git functionsEdward Thomson, Feb 9, 2022
  3. Phillip WoodFeb 9, 2022
  4. Ævar Arnfjörð BjarmasonFeb 15, 2022
  5. Phillip WoodFeb 16, 2022
  6. Ævar Arnfjörð BjarmasonFeb 16, 2022
  7. Johannes SchindelinFeb 17, 2022
  8. Ævar Arnfjörð BjarmasonFeb 17, 2022
  9. Junio C HamanoFeb 17, 2022
  10. Edward ThomsonFeb 17, 2022
  11. Ævar Arnfjörð BjarmasonApr 15, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.