summaryrefslogtreecommitdiff
path: root/examples/general.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-07-05 14:30:48 +0200
committerPatrick Steinhardt <ps@pks.im>2019-07-05 14:30:48 +0200
commit960d2a070f2d1647026d883fd04d8e0a040d07dd (patch)
treec8a210f70bc4dcfffb2189a31288c04170d60bd0 /examples/general.c
parent3be09b6c0295c834792d66c4d38d0e1a1c53e71c (diff)
downloadlibgit2-960d2a070f2d1647026d883fd04d8e0a040d07dd.tar.gz
examples: consolidate includes into "common.h"
Consolidate all standard includes and defines into "common.h". This lets us avoid having to handle platform-specific things in multiple places.
Diffstat (limited to 'examples/general.c')
-rw-r--r--examples/general.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/general.c b/examples/general.c
index 4bd1dac23..ddc53c3e8 100644
--- a/examples/general.c
+++ b/examples/general.c
@@ -36,6 +36,8 @@
* [pg]: https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain
*/
+#include "common.h"
+
/**
* ### Includes
*
@@ -43,9 +45,7 @@
* that you need. It should be the only thing you need to include in order
* to compile properly and get all the libgit2 API.
*/
-#include <git2.h>
-#include <stdio.h>
-#include <string.h>
+#include "git2.h"
static void oid_parsing(git_oid *out);
static void object_database(git_repository *repo, git_oid *oid);