Skip to content

Commit cd5e33f

Browse files
committed
global: DRY includes of assert.h
1 parent 882220b commit cd5e33f

File tree

10 files changed

+4
-14
lines changed

10 files changed

+4
-14
lines changed

examples/add.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414

1515
#include "common.h"
16-
#include <assert.h>
1716

1817
/**
1918
* The following example demonstrates how to add files with libgit2.

examples/checkout.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414

1515
#include "common.h"
16-
#include <assert.h>
1716

1817
/* Define the printf format specifer to use for size_t output */
1918
#if defined(_MSC_VER) || defined(__MINGW32__)

examples/common.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#include <assert.h>
15+
16+
#include "common.h"
17+
1618
#include <stdio.h>
1719
#include <sys/types.h>
1820
#include <sys/stat.h>
@@ -25,7 +27,6 @@
2527
#include <string.h>
2628
#include <errno.h>
2729

28-
#include "common.h"
2930

3031
void check_lg2(int error, const char *message, const char *extra)
3132
{

examples/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#ifndef INCLUDE_examples_common_h__
1515
#define INCLUDE_examples_common_h__
1616

17+
#include <assert.h>
1718
#include <sys/types.h>
1819
#include <sys/stat.h>
1920
#include <stdio.h>

examples/describe.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414

1515
#include "common.h"
16-
#include <assert.h>
1716

1817
/**
1918
* The following example partially reimplements the `git describe` command

examples/merge.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414

1515
#include "common.h"
16-
#include <assert.h>
1716

1817
/** The following example demonstrates how to do merges with libgit2.
1918
*

src/apply.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include "apply.h"
99

10-
#include <assert.h>
11-
1210
#include "git2/apply.h"
1311
#include "git2/patch.h"
1412
#include "git2/filter.h"

src/checkout.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include "checkout.h"
99

10-
#include <assert.h>
11-
1210
#include "git2/repository.h"
1311
#include "git2/refs.h"
1412
#include "git2/tree.h"

src/clone.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include "clone.h"
99

10-
#include <assert.h>
11-
1210
#include "git2/clone.h"
1311
#include "git2/remote.h"
1412
#include "git2/revparse.h"

src/revparse.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include "common.h"
99

10-
#include <assert.h>
11-
1210
#include "buffer.h"
1311
#include "tree.h"
1412
#include "refdb.h"

0 commit comments

Comments
 (0)