Re: [PATCH 2/5] date API: create a date.h, split from cache.h
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 2, 2022, 21:19 UTC
- Message-ID
- <220202.86v8xx6k16.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <patch-2.5-7de62956db4-20220202T195651Z-avarab@gmail.com>
On Wed, Feb 02 2022, Ævar Arnfjörð Bjarmason wrote:
Show 34 quoted lines
> 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@gmail.com>
> ---
> 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.hI 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,