summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Samson <samson.etienne@gmail.com>2019-11-06 11:08:23 +0100
committerEtienne Samson <samson.etienne@gmail.com>2019-11-06 11:08:23 +0100
commitcd5e33fbc2d11477aad954a6f343e791fdc7ef85 (patch)
tree570b274c880395de39a5d53915395ea83e2bb065
parent882220bf116677ff6b89218a5c8bb618463013f4 (diff)
downloadlibgit2-cd5e33fbc2d11477aad954a6f343e791fdc7ef85.tar.gz
global: DRY includes of assert.h
-rw-r--r--examples/add.c1
-rw-r--r--examples/checkout.c1
-rw-r--r--examples/common.c5
-rw-r--r--examples/common.h1
-rw-r--r--examples/describe.c1
-rw-r--r--examples/merge.c1
-rw-r--r--src/apply.c2
-rw-r--r--src/checkout.c2
-rw-r--r--src/clone.c2
-rw-r--r--src/revparse.c2
10 files changed, 4 insertions, 14 deletions
diff --git a/examples/add.c b/examples/add.c
index 14e69e96f..b0c4f600f 100644
--- a/examples/add.c
+++ b/examples/add.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/**
* The following example demonstrates how to add files with libgit2.
diff --git a/examples/checkout.c b/examples/checkout.c
index d552eece8..b706e044e 100644
--- a/examples/checkout.c
+++ b/examples/checkout.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/* Define the printf format specifer to use for size_t output */
#if defined(_MSC_VER) || defined(__MINGW32__)
diff --git a/examples/common.c b/examples/common.c
index 22807e129..47cfac6a0 100644
--- a/examples/common.c
+++ b/examples/common.c
@@ -12,7 +12,9 @@
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
-#include <assert.h>
+
+#include "common.h"
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -25,7 +27,6 @@
#include <string.h>
#include <errno.h>
-#include "common.h"
void check_lg2(int error, const char *message, const char *extra)
{
diff --git a/examples/common.h b/examples/common.h
index 4f0181e38..3657e539b 100644
--- a/examples/common.h
+++ b/examples/common.h
@@ -14,6 +14,7 @@
#ifndef INCLUDE_examples_common_h__
#define INCLUDE_examples_common_h__
+#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
diff --git a/examples/describe.c b/examples/describe.c
index 53f548c8b..181e499b0 100644
--- a/examples/describe.c
+++ b/examples/describe.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/**
* The following example partially reimplements the `git describe` command
diff --git a/examples/merge.c b/examples/merge.c
index 995ac021b..0cdeeeadf 100644
--- a/examples/merge.c
+++ b/examples/merge.c
@@ -13,7 +13,6 @@
*/
#include "common.h"
-#include <assert.h>
/** The following example demonstrates how to do merges with libgit2.
*
diff --git a/src/apply.c b/src/apply.c
index 65b057c60..fc60e1418 100644
--- a/src/apply.c
+++ b/src/apply.c
@@ -7,8 +7,6 @@
#include "apply.h"
-#include <assert.h>
-
#include "git2/apply.h"
#include "git2/patch.h"
#include "git2/filter.h"
diff --git a/src/checkout.c b/src/checkout.c
index d618e3dfa..5cfa7280b 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -7,8 +7,6 @@
#include "checkout.h"
-#include <assert.h>
-
#include "git2/repository.h"
#include "git2/refs.h"
#include "git2/tree.h"
diff --git a/src/clone.c b/src/clone.c
index e8972b482..3d749c32f 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -7,8 +7,6 @@
#include "clone.h"
-#include <assert.h>
-
#include "git2/clone.h"
#include "git2/remote.h"
#include "git2/revparse.h"
diff --git a/src/revparse.c b/src/revparse.c
index 2618b38ee..c627de67c 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -7,8 +7,6 @@
#include "common.h"
-#include <assert.h>
-
#include "buffer.h"
#include "tree.h"
#include "refdb.h"