Skip to content

Commit ff6bbce

Browse files
committed
Merge branch 'rj/header-check'
Header files clean-up. * rj/header-check: delta-islands.h: add missing forward declarations (hdr-check) midx.h: add missing forward declarations (hdr-check) refs/refs-internal.h: add missing declarations (hdr-check) refs/packed-backend.h: add missing declaration (hdr-check) refs/ref-cache.h: add missing declarations (hdr-check) ewah/ewok_rlw.h: add missing include (hdr-check) json-writer.h: add missing include (hdr-check) Makefile: add a hdr-check target
2 parents 7a3335d + 9ce4d21 commit ff6bbce

File tree

8 files changed

+32
-0
lines changed

8 files changed

+32
-0
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,7 @@ ifndef V
17961796
QUIET_MSGFMT = @echo ' ' MSGFMT $@;
17971797
QUIET_GCOV = @echo ' ' GCOV $@;
17981798
QUIET_SP = @echo ' ' SP $<;
1799+
QUIET_HDR = @echo ' ' HDR $<;
17991800
QUIET_RC = @echo ' ' RC $@;
18001801
QUIET_SUBDIR0 = +@subdir=
18011802
QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \
@@ -2678,6 +2679,17 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
26782679
.PHONY: sparse $(SP_OBJ)
26792680
sparse: $(SP_OBJ)
26802681

2682+
GEN_HDRS := command-list.h unicode-width.h
2683+
EXCEPT_HDRS := $(GEN_HDRS) compat% xdiff%
2684+
CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
2685+
HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
2686+
2687+
$(HCO): %.hco: %.h FORCE
2688+
$(QUIET_HDR)$(CC) -include git-compat-util.h -I. -o /dev/null -c -xc $<
2689+
2690+
.PHONY: hdr-check $(HCO)
2691+
hdr-check: $(HCO)
2692+
26812693
.PHONY: style
26822694
style:
26832695
git clang-format --style file --diff --extensions c,h

delta-islands.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef DELTA_ISLANDS_H
22
#define DELTA_ISLANDS_H
33

4+
struct object_id;
5+
struct packing_data;
6+
struct commit;
7+
48
int island_delta_cmp(const struct object_id *a, const struct object_id *b);
59
int in_same_island(const struct object_id *, const struct object_id *);
610
void resolve_tree_islands(int progress, struct packing_data *to_pack);

ewah/ewok_rlw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#ifndef __EWOK_RLW_H__
2020
#define __EWOK_RLW_H__
2121

22+
#include "ewok.h"
23+
2224
#define RLW_RUNNING_BITS (sizeof(eword_t) * 4)
2325
#define RLW_LITERAL_BITS (sizeof(eword_t) * 8 - 1 - RLW_RUNNING_BITS)
2426

json-writer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
* of the given strings.
4343
*/
4444

45+
#include "strbuf.h"
46+
4547
struct json_writer
4648
{
4749
/*

midx.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#include "repository.h"
55

6+
struct object_id;
7+
struct pack_entry;
8+
69
struct multi_pack_index {
710
struct multi_pack_index *next;
811

refs/packed-backend.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef REFS_PACKED_BACKEND_H
22
#define REFS_PACKED_BACKEND_H
33

4+
struct ref_transaction;
5+
46
/*
57
* Support for storing references in a `packed-refs` file.
68
*

refs/ref-cache.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#ifndef REFS_REF_CACHE_H
22
#define REFS_REF_CACHE_H
33

4+
#include "cache.h"
5+
46
struct ref_dir;
7+
struct ref_store;
58

69
/*
710
* If this ref_cache is filled lazily, this function is used to load

refs/refs-internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#ifndef REFS_REFS_INTERNAL_H
22
#define REFS_REFS_INTERNAL_H
33

4+
#include "cache.h"
5+
#include "refs.h"
46
#include "iterator.h"
57

8+
struct ref_transaction;
9+
610
/*
711
* Data structures and functions for the internal use of the refs
812
* module. Code outside of the refs module should use only the public

0 commit comments

Comments
 (0)