Skip to content

Commit 1c4b660

Browse files
davvidgitster
authored andcommitted
cleanups: ensure that git-compat-util.h is included first
CodingGuidelines states that the first #include in C files should be git-compat-util.h or another header file that includes it, such as cache.h or builtin.h. Signed-off-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 96db324 commit 1c4b660

9 files changed

+7
-8
lines changed

bulk-checkin.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright (c) 2011, Google Inc.
33
*/
4+
#include "cache.h"
45
#include "bulk-checkin.h"
56
#include "csum-file.h"
67
#include "pack.h"

bulk-checkin.h

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#ifndef BULK_CHECKIN_H
55
#define BULK_CHECKIN_H
66

7-
#include "cache.h"
8-
97
extern int index_bulk_checkin(unsigned char sha1[],
108
int fd, size_t size, enum object_type type,
119
const char *path, unsigned flags);

http.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "git-compat-util.h"
12
#include "http.h"
23
#include "pack.h"
34
#include "sideband.h"

merge-recursive.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Fredrik Kuivinen.
44
* The thieves were Alex Riesen and Johannes Schindelin, in June/July 2006
55
*/
6-
#include "advice.h"
76
#include "cache.h"
7+
#include "advice.h"
88
#include "cache-tree.h"
99
#include "commit.h"
1010
#include "blob.h"

sigchain.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "sigchain.h"
21
#include "cache.h"
2+
#include "sigchain.h"
33

44
#define SIGCHAIN_MAX_SIGNALS 32
55

test-regex.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <git-compat-util.h>
1+
#include "git-compat-util.h"
22

33
int main(int argc, char **argv)
44
{

test-sigchain.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "sigchain.h"
21
#include "cache.h"
2+
#include "sigchain.h"
33

44
#define X(f) \
55
static void f(int sig) { \

varint.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "git-compat-util.h"
12
#include "varint.h"
23

34
uintmax_t decode_varint(const unsigned char **bufp)

varint.h

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef VARINT_H
22
#define VARINT_H
33

4-
#include "git-compat-util.h"
5-
64
extern int encode_varint(uintmax_t, unsigned char *);
75
extern uintmax_t decode_varint(const unsigned char **);
86

0 commit comments

Comments
 (0)