Why isn't builtin.h used by all builtin/*.c files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]