Skip to content

Commit ef3ca95

Browse files
newrengitster
authored andcommitted
Add missing includes and forward declarations
I looped over the toplevel header files, creating a temporary two-line C program for each consisting of #include "git-compat-util.h" #include $HEADER This patch is the result of manually fixing errors in compiling those tiny programs. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1d89318 commit ef3ca95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+132
-4
lines changed

alloc.h

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

4+
struct alloc_state;
45
struct tree;
56
struct commit;
67
struct tag;
8+
struct repository;
79

810
void *alloc_blob_node(struct repository *r);
911
void *alloc_tree_node(struct repository *r);

apply.h

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

4+
#include "lockfile.h"
5+
#include "string-list.h"
6+
47
enum apply_ws_error_action {
58
nowarn_ws_error,
69
warn_on_ws_error,

archive.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef ARCHIVE_H
22
#define ARCHIVE_H
33

4+
#include "cache.h"
45
#include "pathspec.h"
56

67
struct archiver_args {

attr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ struct git_attr;
77
/* opaque structures used internally for attribute collection */
88
struct all_attrs_item;
99
struct attr_stack;
10+
struct index_state;
1011

1112
/*
1213
* Given a string, return the gitattribute object that

bisect.h

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

4+
struct commit_list;
5+
46
/*
57
* Find bisection. If something is found, `reaches` will be the number of
68
* commits that the best commit reaches. `all` will be the count of

branch.h

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

4+
struct strbuf;
5+
46
/* Functions for acting on the information about branches. */
57

68
/*

bulk-checkin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#ifndef BULK_CHECKIN_H
55
#define BULK_CHECKIN_H
66

7+
#include "cache.h"
8+
79
extern int index_bulk_checkin(struct object_id *oid,
810
int fd, size_t size, enum object_type type,
911
const char *path, unsigned flags);

column.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static inline int column_active(unsigned int colopts)
3636
return (colopts & COL_ENABLE_MASK) == COL_ENABLED;
3737
}
3838

39+
struct string_list;
3940
extern void print_columns(const struct string_list *list, unsigned int colopts,
4041
const struct column_options *opts);
4142

commit-graph.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "git-compat-util.h"
55
#include "repository.h"
66
#include "string-list.h"
7+
#include "cache.h"
78

89
struct commit;
910

config.h

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

4+
#include "hashmap.h"
5+
#include "string-list.h"
6+
7+
struct object_id;
8+
49
/* git_config_parse_key() returns these negated: */
510
#define CONFIG_INVALID_KEY 1
611
#define CONFIG_NO_SECTION_OR_NAME 2

0 commit comments

Comments
 (0)