Skip to content

Commit d1ea30c

Browse files
committed
Move include files to include/git/, drop git_ prefix from file names
Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 3e89665 commit d1ea30c

File tree

12 files changed

+25
-25
lines changed

12 files changed

+25
-25
lines changed

CONVENTIONS

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ the following form, where ${filename} is the name of the file,
8585
after replacing non-identifier characters with '_'.
8686

8787
----
88-
#ifndef INCLUDE_${filename}_h__
89-
#define INCLUDE_${filename}_h__
88+
#ifndef INCLUDE_git_${filename}_h__
89+
#define INCLUDE_git_${filename}_h__
9090

91-
#include "git_common.h"
91+
#include "git/common.h"
9292

9393
/**
94-
* @file ${filename}.h
94+
* @file git/${filename}.h
9595
* @brief Git some description
96-
* @defgroup ${filename} some description routines
96+
* @defgroup git_${filename} some description routines
9797
* @ingroup Git
9898
* @{
9999
*/

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ DOXYGEN = doxygen
44

55
CFLAGS = -g -O2
66

7-
BASIC_CFLAGS := -Isrc
7+
BASIC_CFLAGS := -Iinclude
88
BASIC_CFLAGS += -DGIT__PRIVATE
99
BASIC_CFLAGS += -fvisibility=hidden
1010

1111
OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
12-
HDRS = $(wildcard src/*.h)
12+
HDRS = $(wildcard include/git/*.h)
1313

1414

1515
all:: libgit2.a

api.doxygen

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PROJECT_NAME = libgit2
22

3-
INPUT = src
3+
INPUT = include
44
QUIET = YES
55
RECURSIVE = YES
66
FILE_PATTERNS = *.h

src/git_commit.h include/git/commit.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
#ifndef INCLUDE_git_commit_h__
3737
#define INCLUDE_git_commit_h__
3838

39-
#include "git_common.h"
40-
#include "git_oid.h"
39+
#include "git/common.h"
40+
#include "git/oid.h"
4141
#include <time.h>
4242

4343
/**
44-
* @file git_commit.h
44+
* @file git/commit.h
4545
* @brief Git commit parsing, formatting routines
4646
* @defgroup git_commit Git commit parsing, formatting routines
4747
* @ingroup Git

src/git_common.h include/git/common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#endif
4848

4949
/**
50-
* @file git_common.h
50+
* @file git/common.h
5151
* @brief Git common platform definitions
5252
* @defgroup git_common Git common platform definitions
5353
* @ingroup Git

src/git_odb.h include/git/odb.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
#ifndef INCLUDE_git_odb_h__
3737
#define INCLUDE_git_odb_h__
3838

39-
#include "git_common.h"
40-
#include "git_oid.h"
39+
#include "git/common.h"
40+
#include "git/oid.h"
4141
#include <unistd.h>
4242

4343
/**
44-
* @file git_odb.h
44+
* @file git/odb.h
4545
* @brief Git object database routines
4646
* @defgroup git_odb Git object database routines
4747
* @ingroup Git

src/git_oid.h include/git/oid.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
#ifndef INCLUDE_git_oid_h__
3737
#define INCLUDE_git_oid_h__
3838

39-
#include "git_common.h"
39+
#include "git/common.h"
4040

4141
/**
42-
* @file git_oid.h
42+
* @file git/oid.h
4343
* @brief Git object id routines
4444
* @defgroup git_oid Git object id routines
4545
* @ingroup Git

src/git_revwalk.h include/git/revwalk.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
#ifndef INCLUDE_git_revwalk_h__
3737
#define INCLUDE_git_revwalk_h__
3838

39-
#include "git_common.h"
40-
#include "git_odb.h"
41-
#include "git_commit.h"
39+
#include "git/common.h"
40+
#include "git/odb.h"
41+
#include "git/commit.h"
4242

4343
/**
44-
* @file git_revwalk.h
44+
* @file git/revwalk.h
4545
* @brief Git revision traversal routines
4646
* @defgroup git_revwalk Git revision traversal routines
4747
* @ingroup Git

src/git_commit.c src/commit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3434
*/
3535

36-
#include "git_commit.h"
36+
#include "git/commit.h"
3737

3838
const git_oid *git_commit_id(git_commit *c)
3939
{

src/git_odb.c src/odb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3434
*/
3535

36-
#include "git_odb.h"
36+
#include "git/odb.h"
3737

3838
struct git_odb {
3939
/** Path to the "objects" directory. */

src/git_oid.c src/oid.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3434
*/
3535

36-
#include "git_oid.h"
36+
#include "git/oid.h"
3737
#include <string.h>
3838

3939
static signed char from_hex[] = {

src/git_revwalk.c src/revwalk.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3434
*/
3535

36-
#include "git_revwalk.h"
36+
#include "git/revwalk.h"
3737
#include <stdlib.h>
3838

3939
struct git_revp {

0 commit comments

Comments
 (0)