summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Ericsson <ae@op5.se>2008-11-18 21:28:55 +0100
committerShawn O. Pearce <spearce@spearce.org>2008-11-22 12:08:00 -0800
commit4f0adcd0e61eabe06fe32be66b16559537124b7a (patch)
tree4fc3874b118752e40de556b1c3e7b4a9f1737d00 /src
parent36f0f61fc8578478a9dc9b33a1a0d07cdb98a5e5 (diff)
downloadlibgit2-4f0adcd0e61eabe06fe32be66b16559537124b7a.tar.gz
Get rid of GIT__PRIVATE macro
Using it in the first place means something's wrong. This patch replaces it with an internal header which carries the previously "protected" code instead. Internal source-files simply include "commit.h" and they're done. The internal header includes the public one to make sure we always use the proper prototype. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src')
-rw-r--r--src/commit.c2
-rw-r--r--src/commit.h14
-rw-r--r--src/git/commit.h8
3 files changed, 15 insertions, 9 deletions
diff --git a/src/commit.c b/src/commit.c
index 7c982100f..ce02d0ef9 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -23,7 +23,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include "git/commit.h"
+#include "commit.h"
const git_oid *git_commit_id(git_commit *c)
{
diff --git a/src/commit.h b/src/commit.h
new file mode 100644
index 000000000..c863948af
--- /dev/null
+++ b/src/commit.h
@@ -0,0 +1,14 @@
+#ifndef INCLUDE_commit_h__
+#define INCLUDE_commit_h__
+#include "git/commit.h"
+
+#include <time.h>
+
+struct git_commit {
+ git_oid id;
+ time_t commit_time;
+ unsigned parsed:1,
+ flags:26;
+};
+
+#endif
diff --git a/src/git/commit.h b/src/git/commit.h
index 8cb3e7d4c..a4e23d6af 100644
--- a/src/git/commit.h
+++ b/src/git/commit.h
@@ -40,14 +40,6 @@ GIT_BEGIN_DECL
/** Parsed representation of a commit object. */
typedef struct git_commit git_commit;
-#ifdef GIT__PRIVATE
-struct git_commit {
- git_oid id;
- time_t commit_time;
- unsigned parsed:1,
- flags:26;
-};
-#endif
/**
* Parse (or lookup) a commit from a revision pool.