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

Re: [PATCH 4/4] builtin: use builtin.h for all builtin commands

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 17, 2010, 20:08 UTC
Message-ID
<AANLkTikw0+FGJmj7C0B9J_3ZVXrbqCw+UzyP3sqfyVdm@mail.gmail.com>
In-Reply-To
<7vzkt7enfn.fsf@alter.siamese.dyndns.org>
On Wed, Nov 17, 2010 at 20:54, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> Change the builtin/*.c files and wt-status.c files which weren't using
>> builtin.h to use it, also remove any git-compat-util.h, strbuf.h and
>> cache.h from those files. We can trust on builtin.h including them.
>
> As I already said, buitlin/*.c is fine, but wt-status.c is very dubious.

So I should resend this patch with `#include "gettext.h"` in wt-status.c and the rest unchanged, along with a new commit message?

Show 7 quoted lines
>> This impeded my efforts to gettextize git, since I'd otherwise have to
>> add gettext.h to all of these. Using builtin.h is a good idea in any
>> case, since it's defining the prototypes for the cmd_* functions that
>> these files define.
>
> What about non-builtin commands?  Don't they need to include gettext.h
> anyway?

In my patch to add gettext infrastructure I add gettext.h to imap-send.c and friends which have their own main.

> I would have expected that gettext.h would be included from cache.h, so
> that all gitty commands, whether they are builtin or standalone, have
> access to the symbols defined in it.

I can do that too. I just got the impression previously that we wanted to only include things in headers that made sense according to their name. Gettext has nothing to do with the cache, and cache.h itself doesn't need it.

But if we want to stick it in there that's fine by me, I just care about the ends, not the means. So just say which way you want it and I can cook up a patch.

Previous: Junio C HamanoNext: Jonathan Nieder
Message 23 of 25 in “[PULL] ab/i18n-prereqs, prerequisites for ab/i18n”
  1. 0/4 [PULL] ab/i18n-prereqs, prerequisites for ab/i18nÆvar Arnfjörð Bjarmason, Nov 14, 2010
  2. 1/4 Makefile: move "Platform specific tweaks" above LIB_{H,OBJS}Ævar Arnfjörð Bjarmason, Nov 14, 2010
  3. Jonathan NiederNov 14, 2010
  4. Ævar Arnfjörð BjarmasonNov 14, 2010
  5. Jonathan NiederNov 14, 2010
  6. Junio C HamanoNov 15, 2010
  7. Jonathan NiederNov 15, 2010
  8. Ævar Arnfjörð BjarmasonNov 15, 2010
  9. Junio C HamanoNov 14, 2010
  10. Jonathan NiederNov 14, 2010
  11. Junio C HamanoNov 14, 2010
  12. 2/4 t7004-tag.sh: re-arrange git tag comment for clarityÆvar Arnfjörð Bjarmason, Nov 14, 2010
  13. Jonathan NiederNov 14, 2010
  14. Ævar Arnfjörð BjarmasonNov 14, 2010
  15. 3/4 tests: use test_cmp instead of piping to diff(1)Ævar Arnfjörð Bjarmason, Nov 14, 2010
  16. Jonathan NiederNov 14, 2010
  17. 4/4 builtin: use builtin.h for all builtin commandsÆvar Arnfjörð Bjarmason, Nov 14, 2010
  18. Sverre RabbelierNov 14, 2010
  19. Ævar Arnfjörð BjarmasonNov 14, 2010
  20. Junio C HamanoNov 14, 2010
  21. Jonathan NiederNov 14, 2010
  22. Junio C HamanoNov 17, 2010
  23. Ævar Arnfjörð BjarmasonNov 17, 2010
  24. Jonathan NiederNov 17, 2010
  25. Jonathan NiederNov 14, 2010

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.