# [PATCH v3] Place cache.h at the first place to match general rule

2 messages from 2014-03-02 to 2014-03-03. Participants: Sun He, Eric Sunshine.
Thread: https://gitlist.dev/t/36019

## Sun He, 2014-03-02 08:31

Subject: [PATCH v3] Place cache.h at the first place to match general rule
Message-ID: <1393749101-14985-1-git-send-email-sunheehnus@gmail.com>
URL: https://gitlist.dev/e/1393749101-14985-1-git-send-email-sunheehnus%40gmail.com

```
 The general rule is if cache.h or git-compat-util.h is included,
 it is the first #include.
 As builtin.h starts with git-compat-util.h, files that start with builtin.h
 are not changed.

Helped-by: Duy Nguyen <pclouds@gmail.com>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Sun He <sunheehnus@gmail.com>
---

 "PATCH v3" fix the position of information I want to convey to readers,
 with the directions of Eric Sunshine.

 sigchain.c and test-sigchain.c are started with "sigchain.h"
 I checked sigchain.h, and it didn't import any bug.
 But to keep consistant with general rule, we should take this patch.

 sigchain.c      | 2 +-
 test-sigchain.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sigchain.c b/sigchain.c
index 1118b99..faa375d 100644
--- a/sigchain.c
+++ b/sigchain.c
@@ -1,5 +1,5 @@
-#include "sigchain.h"
 #include "cache.h"
+#include "sigchain.h"
 
 #define SIGCHAIN_MAX_SIGNALS 32
 
diff --git a/test-sigchain.c b/test-sigchain.c
index 42db234..e499fce 100644
--- a/test-sigchain.c
+++ b/test-sigchain.c
@@ -1,5 +1,5 @@
-#include "sigchain.h"
 #include "cache.h"
+#include "sigchain.h"
 
 #define X(f) \
 static void f(int sig) { \
-- 
1.9.0.138.g2de3478.dirty

```

## Eric Sunshine, 2014-03-03 07:44

Subject: Re: [PATCH v3] Place cache.h at the first place to match general rule
Message-ID: <CAPig+cRPjf4vCsPzOSoe+exw4o5rN_W=N7N0k5=rj=J9xsYSeQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcRPjf4vCsPzOSoe%2Bexw4o5rN_W%3DN7N0k5%3Drj%3DJ9xsYSeQ%40mail.gmail.com
In-Reply-To: <1393749101-14985-1-git-send-email-sunheehnus@gmail.com>

```
On Sun, Mar 2, 2014 at 3:31 AM, Sun He <sunheehnus@gmail.com> wrote:
>  The general rule is if cache.h or git-compat-util.h is included,
>  it is the first #include.
>  As builtin.h starts with git-compat-util.h, files that start with builtin.h
>  are not changed.

Minor: Odd one-space indentation on each line of commit message.

> Helped-by: Duy Nguyen <pclouds@gmail.com>
> Helped-by: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: Sun He <sunheehnus@gmail.com>
> ---
>
>  "PATCH v3" fix the position of information I want to convey to readers,
>  with the directions of Eric Sunshine.
>
>  sigchain.c and test-sigchain.c are started with "sigchain.h"
>  I checked sigchain.h, and it didn't import any bug.
>  But to keep consistant with general rule, we should take this patch.
>
>  sigchain.c      | 2 +-
>  test-sigchain.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sigchain.c b/sigchain.c
> index 1118b99..faa375d 100644
> --- a/sigchain.c
> +++ b/sigchain.c
> @@ -1,5 +1,5 @@
> -#include "sigchain.h"
>  #include "cache.h"
> +#include "sigchain.h"
>
>  #define SIGCHAIN_MAX_SIGNALS 32
>
> diff --git a/test-sigchain.c b/test-sigchain.c
> index 42db234..e499fce 100644
> --- a/test-sigchain.c
> +++ b/test-sigchain.c
> @@ -1,5 +1,5 @@
> -#include "sigchain.h"
>  #include "cache.h"
> +#include "sigchain.h"
>
>  #define X(f) \
>  static void f(int sig) { \
> --
> 1.9.0.138.g2de3478.dirty
>

```
