All of lore.kernel.org
 help / color / mirror / Atom feed
* Why isn't builtin.h used by all builtin/*.c files?
@ 2010-09-01 14:17 Ævar Arnfjörð Bjarmason
  2010-09-01 14:56 ` Stephen Boyd
  2010-09-01 16:23 ` [PATCH] builtin: use builtin.h for all builtin/ commands Ævar Arnfjörð Bjarmason
  0 siblings, 2 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-09-01 14:17 UTC (permalink / raw)
  To: Git Mailing List, Daniel Barkalow

I'm working on gettextizing the 'mainporcelain common' commands now,
and I ran into this:

    $ perl -MArray::Diff -E 'chomp(my @hb = qx[ack -l builtin.h *.c]);
my @c = glob "*.c"; my $d = Array::Diff->diff( \@c, \@hb ); say for
@{$d->deleted}'
    fetch-pack.c
    hash-object.c
    index-pack.c
    merge-index.c
    merge-recursive.c
    merge-tree.c
    mktag.c
    pack-redundant.c
    pack-refs.c
    patch-id.c
    receive-pack.c
    remote-ext.c
    remote-fd.c
    remote.c
    reset.c
    send-pack.c
    skew.c
    unpack-file.c
    var.c

There seems to be no reason not to do this:

    --- a/builtin/clone.c
    +++ b/builtin/clone.c
    @@ -10,3 +10,3 @@

    -#include "cache.h"
    +#include "builtin.h"
     #include "parse-options.h"
    @@ -18,3 +18,2 @@
     #include "transport.h"
    -#include "strbuf.h"
     #include "dir.h"

builtin.h even includes the cmd_clone() prototype. I'm only asking
since clone.c was added *after* builtin.h, so this seems like an
omission.

Anyway, I'll convert these to builtin.h where appropriate as part of
the series unless someone can find a good reason not to.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-01 17:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01 14:17 Why isn't builtin.h used by all builtin/*.c files? Ævar Arnfjörð Bjarmason
2010-09-01 14:56 ` Stephen Boyd
2010-09-01 17:31   ` Junio C Hamano
2010-09-01 16:23 ` [PATCH] builtin: use builtin.h for all builtin/ commands Ævar Arnfjörð Bjarmason
2010-09-01 17:43   ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.