# [PATCH 4/5] read-cache: remove unused #include "sigchain.h"

11 messages from 2015-10-22 to 2015-10-26. Participants: Tobias Klauser, Junio C Hamano, Michael Haggerty.
Thread: https://gitlist.dev/t/40617

## Tobias Klauser, 2015-10-22 12:43

Subject: [PATCH 0/5] Remove unused #include "sigchain.h"
Message-ID: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>
URL: https://gitlist.dev/e/1445517810-13998-1-git-send-email-tklauser%40distanz.ch

```
This series removes the #include of sigchain.h from several modules
after they were changed to use the tempfile module and they thus no
longer use any declarations from sigchain.h

Tobias Klauser (5):
  gc: remove unused #include "sigchain.h"
  credential-cache--daemon: remove unused #include "sigchain.h"
  diff: remove unused #include "sigchain.h"
  read-cache: remove unused #include "sigchain.h"
  shallow: remove unused #include "sigchain.h"

 builtin/gc.c               | 1 -
 credential-cache--daemon.c | 1 -
 diff.c                     | 1 -
 read-cache.c               | 1 -
 shallow.c                  | 1 -
 5 files changed, 5 deletions(-)

-- 
2.6.1.148.g7927db1

```

## Tobias Klauser, 2015-10-22 12:43

Subject: [PATCH 1/5] gc: remove unused #include "sigchain.h"
Message-ID: <1445517810-13998-2-git-send-email-tklauser@distanz.ch>
URL: https://gitlist.dev/e/1445517810-13998-2-git-send-email-tklauser%40distanz.ch
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
After switching to use the tempfile module in commit ebebeaea (gc: use
tempfile module to handle gc.pid file), no declarations from sigchain.h
are used in builtin/gc.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 builtin/gc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/builtin/gc.c b/builtin/gc.c
index 9ff0204..dc8a242 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -15,7 +15,6 @@
 #include "lockfile.h"
 #include "parse-options.h"
 #include "run-command.h"
-#include "sigchain.h"
 #include "argv-array.h"
 #include "commit.h"
 
-- 
2.6.1.148.g7927db1

```

## Tobias Klauser, 2015-10-22 12:43

Subject: [PATCH 2/5] credential-cache--daemon: remove unused #include "sigchain.h"
Message-ID: <1445517810-13998-3-git-send-email-tklauser@distanz.ch>
URL: https://gitlist.dev/e/1445517810-13998-3-git-send-email-tklauser%40distanz.ch
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
After switching to use the tempfile module in commit 9e903316
(credential-cache--daemon: use tempfile module), no declarations from
sigchain.h are used in credential-cache--daemon.c anymore. Thus, remove
the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 credential-cache--daemon.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
index eef6fce..82715aa 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
@@ -2,7 +2,6 @@
 #include "tempfile.h"
 #include "credential.h"
 #include "unix-socket.h"
-#include "sigchain.h"
 #include "parse-options.h"
 
 static struct tempfile socket_file;
-- 
2.6.1.148.g7927db1

```

## Tobias Klauser, 2015-10-22 12:43

Subject: [PATCH 3/5] diff: remove unused #include "sigchain.h"
Message-ID: <1445517810-13998-4-git-send-email-tklauser@distanz.ch>
URL: https://gitlist.dev/e/1445517810-13998-4-git-send-email-tklauser%40distanz.ch
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
After switching to use the tempfile module in commit 284098f1
(diff: use tempfile module), no declarations from sigchain.h are used in
diff.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 diff.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/diff.c b/diff.c
index 46260ed..df47592 100644
--- a/diff.c
+++ b/diff.c
@@ -13,7 +13,6 @@
 #include "run-command.h"
 #include "utf8.h"
 #include "userdiff.h"
-#include "sigchain.h"
 #include "submodule-config.h"
 #include "submodule.h"
 #include "ll-merge.h"
-- 
2.6.1.148.g7927db1

```

## Tobias Klauser, 2015-10-22 12:43

Subject: [PATCH 4/5] read-cache: remove unused #include "sigchain.h"
Message-ID: <1445517810-13998-5-git-send-email-tklauser@distanz.ch>
URL: https://gitlist.dev/e/1445517810-13998-5-git-send-email-tklauser%40distanz.ch
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
After switching to use the tempfile module in commit f6ecc62d
(write_shared_index(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 read-cache.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/read-cache.c b/read-cache.c
index 87204a5..3ecb99d 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -17,7 +17,6 @@
 #include "strbuf.h"
 #include "varint.h"
 #include "split-index.h"
-#include "sigchain.h"
 #include "utf8.h"
 
 static struct cache_entry *refresh_cache_entry(struct cache_entry *ce,
-- 
2.6.1.148.g7927db1

```

## Tobias Klauser, 2015-10-22 12:43

Subject: [PATCH 5/5] shallow: remove unused #include "sigchain.h"
Message-ID: <1445517810-13998-6-git-send-email-tklauser@distanz.ch>
URL: https://gitlist.dev/e/1445517810-13998-6-git-send-email-tklauser%40distanz.ch
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
After switching to use the tempfile module in commit 6e122b44
(setup_temporary_shallow(): use tempfile module), no declarations from
sigchain.h are used in read-cache.c anymore. Thus, remove the #include.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 shallow.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/shallow.c b/shallow.c
index d49a3d6..4f9d667 100644
--- a/shallow.c
+++ b/shallow.c
@@ -10,7 +10,6 @@
 #include "diff.h"
 #include "revision.h"
 #include "commit-slab.h"
-#include "sigchain.h"
 
 static int is_shallow = -1;
 static struct stat_validity shallow_stat;
-- 
2.6.1.148.g7927db1

```

## Junio C Hamano, 2015-10-22 17:30

Subject: Re: [PATCH 0/5] Remove unused #include "sigchain.h"
Message-ID: <xmqqr3kmstek.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqr3kmstek.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
Makes sense; will queue directly on top of the original tempfile
series and merge.

```

## Junio C Hamano, 2015-10-22 20:14

Subject: Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"
Message-ID: <xmqqk2qer78a.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqk2qer78a.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <1445517810-13998-2-git-send-email-tklauser@distanz.ch>

```
Tobias Klauser <tklauser@distanz.ch> writes:

> After switching to use the tempfile module in commit ebebeaea (gc: use
> tempfile module to handle gc.pid file), no declarations from sigchain.h
> are used in builtin/gc.c anymore. Thus, remove the #include.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---

I'll drop this one as we seem to have gained another user of the API
in this file in the nd/gc-auto-background-fix topic.

>  builtin/gc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/builtin/gc.c b/builtin/gc.c
> index 9ff0204..dc8a242 100644
> --- a/builtin/gc.c
> +++ b/builtin/gc.c
> @@ -15,7 +15,6 @@
>  #include "lockfile.h"
>  #include "parse-options.h"
>  #include "run-command.h"
> -#include "sigchain.h"
>  #include "argv-array.h"
>  #include "commit.h"

```

## Tobias Klauser, 2015-10-23 07:25

Subject: Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"
Message-ID: <20151023072527.GR2468@distanz.ch>
URL: https://gitlist.dev/e/20151023072527.GR2468%40distanz.ch
In-Reply-To: <xmqqk2qer78a.fsf@gitster.mtv.corp.google.com>

```
On 2015-10-22 at 22:14:29 +0200, Junio C Hamano <gitster@pobox.com> wrote:
> Tobias Klauser <tklauser@distanz.ch> writes:
> 
> > After switching to use the tempfile module in commit ebebeaea (gc: use
> > tempfile module to handle gc.pid file), no declarations from sigchain.h
> > are used in builtin/gc.c anymore. Thus, remove the #include.
> >
> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> > ---
> 
> I'll drop this one as we seem to have gained another user of the API
> in this file in the nd/gc-auto-background-fix topic.

Opps, sorry I didn't check against 'pu' carefully enough. Thanks for
catching it.

```

## Junio C Hamano, 2015-10-23 17:00

Subject: Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"
Message-ID: <xmqqoafpplk9.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqoafpplk9.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20151023072527.GR2468@distanz.ch>

```
Tobias Klauser <tklauser@distanz.ch> writes:

> On 2015-10-22 at 22:14:29 +0200, Junio C Hamano <gitster@pobox.com> wrote:
>> Tobias Klauser <tklauser@distanz.ch> writes:
>> 
>> > After switching to use the tempfile module in commit ebebeaea (gc: use
>> > tempfile module to handle gc.pid file), no declarations from sigchain.h
>> > are used in builtin/gc.c anymore. Thus, remove the #include.
>> >
>> > Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> > ---
>> 
>> I'll drop this one as we seem to have gained another user of the API
>> in this file in the nd/gc-auto-background-fix topic.
>
> Opps, sorry I didn't check against 'pu' carefully enough. Thanks for
> catching it.

Heh, that topic has been in master since Oct 15, I think.

```

## Michael Haggerty, 2015-10-26 20:59

Subject: Re: [PATCH 0/5] Remove unused #include "sigchain.h"
Message-ID: <562E9422.5080708@alum.mit.edu>
URL: https://gitlist.dev/e/562E9422.5080708%40alum.mit.edu
In-Reply-To: <1445517810-13998-1-git-send-email-tklauser@distanz.ch>

```
On 10/22/2015 02:43 PM, Tobias Klauser wrote:
> This series removes the #include of sigchain.h from several modules
> after they were changed to use the tempfile module and they thus no
> longer use any declarations from sigchain.h
> 
> Tobias Klauser (5):
>   gc: remove unused #include "sigchain.h"
>   credential-cache--daemon: remove unused #include "sigchain.h"
>   diff: remove unused #include "sigchain.h"
>   read-cache: remove unused #include "sigchain.h"
>   shallow: remove unused #include "sigchain.h"

Thanks for cleaning these up, Tobias. I totally forgot to look for
includes that were no longer needed.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu

```
