threads / patch / 40617

patch, 5 partsread-cache: remove unused #include "sigchain.h"

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

## tl;dr

11 messages between Oct 22, 2015 and Oct 26, 2015. Diffs are folded; open one to read it.

replies: 10people: 3as markdown or json

Tobias Klauser· Oct 22, 2015, 12:43 UTC · lore

[PATCH 0/5] Remove unused #include "sigchain.h"

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· Oct 22, 2015, 12:43 UTC · re: Tobias Klauser · lore

[PATCH 1/5] gc: remove unused #include "sigchain.h"

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(-)
Show changes to builtin/gc.c +0 −1
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
Junio C Hamano· Oct 22, 2015, 20:14 UTC · re: Tobias Klauser · lore

Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"

Tobias Klauser <tklauser@distanz.ch> writes:
Show 6 quoted lines
> 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.

Show 14 quoted lines
>  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· Oct 23, 2015, 07:25 UTC · re: Junio C Hamano · lore

Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"

On 2015-10-22 at 22:14:29 +0200, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> 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· Oct 23, 2015, 17:00 UTC · re: Tobias Klauser · lore

Re: [PATCH 1/5] gc: remove unused #include "sigchain.h"

Tobias Klauser <tklauser@distanz.ch> writes:
Show 15 quoted lines
> 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.
Tobias Klauser· Oct 22, 2015, 12:43 UTC · re: Tobias Klauser · lore

[PATCH 2/5] credential-cache--daemon: remove unused #include "sigchain.h"

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(-)
Show changes to credential-cache--daemon.c +0 −1
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· Oct 22, 2015, 12:43 UTC · re: Tobias Klauser · lore

[PATCH 3/5] diff: remove unused #include "sigchain.h"

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(-)
Show changes to diff.c +0 −1
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· Oct 22, 2015, 12:43 UTC · re: Tobias Klauser · lore

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(-)
Show changes to read-cache.c +0 −1
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· Oct 22, 2015, 12:43 UTC · re: Tobias Klauser · lore

[PATCH 5/5] shallow: remove unused #include "sigchain.h"

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(-)
Show changes to shallow.c +0 −1
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
Michael Haggerty· Oct 26, 2015, 20:59 UTC · re: Tobias Klauser · lore

Re: [PATCH 0/5] Remove unused #include "sigchain.h"

On 10/22/2015 02:43 PM, Tobias Klauser wrote:
Show 10 quoted lines
> 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

← back to recent threads