Re: [PATCH 2/5] date API: create a date.h, split from cache.h

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

 



On Wed, Feb 02 2022, Ævar Arnfjörð Bjarmason wrote:

> Move the declaration of the date.c functions from cache.h, and adjust
> the relevant users to include the new date.h header.
>
> The show_ident_date() function belonged in pretty.h (it's defined in
> pretty.c), its two users outside of pretty.c didn't strictly need to
> include pretty.h, as they get it indirectly, but let's add it to them
> anyway.
>
> Similarly, the change to "builtin/{fast-import,show-branch,tag}.c"
> isn't needed as far as the compiler is concerned, but since they all
> use the "DATE_MODE()" macro we now define in date.h, let's have them
> include it.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
> ---
>  archive-zip.c         |  1 +
>  builtin/am.c          |  1 +
>  builtin/commit.c      |  1 +
>  builtin/fast-import.c |  1 +
>  builtin/show-branch.c |  1 +
>  builtin/tag.c         |  1 +
>  cache.h               | 48 -------------------------------------------
>  config.c              |  1 +
>  date.c                |  1 +
>  date.h                | 43 ++++++++++++++++++++++++++++++++++++++
>  http-backend.c        |  1 +
>  ident.c               |  1 +
>  object-name.c         |  1 +
>  pretty.h              | 10 +++++++++
>  refs.c                |  1 +
>  strbuf.c              |  1 +
>  t/helper/test-date.c  |  1 +
>  17 files changed, 67 insertions(+), 48 deletions(-)
>  create mode 100644 date.h

I managed to notice just after hitting "send" that I'd forgotten to
"make hdr-check". This commit will need the below fix-up. I'll hold off
on a v2 for now for any further comments though:

diff --git a/reflog-walk.h b/reflog-walk.h
index f26408f6cc1..e9e00ffd479 100644
--- a/reflog-walk.h
+++ b/reflog-walk.h
@@ -5,6 +5,7 @@
 
 struct commit;
 struct reflog_walk_info;
+struct date_mode;
 
 void init_reflog_walk(struct reflog_walk_info **info);
 int add_reflog_for_walk(struct reflog_walk_info *info,




[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]

  Powered by Linux