summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/branch.h2
-rw-r--r--include/git2/odb_backend.h14
-rw-r--r--include/git2/refs.h2
-rw-r--r--include/git2/status.h33
-rw-r--r--include/git2/types.h4
5 files changed, 29 insertions, 26 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index f4681dc09..69e7d1689 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -69,7 +69,7 @@ GIT_EXTERN(int) git_branch_create(
GIT_EXTERN(int) git_branch_delete(
git_repository *repo,
const char *branch_name,
- git_branch_type branch_type);
+ git_branch_t branch_type);
/**
* Fill a list with all the branches in the Repository
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index 9a0133f37..f4620f5f4 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -74,6 +74,13 @@ struct git_odb_backend {
void (* free)(struct git_odb_backend *);
};
+/** Streaming mode */
+enum {
+ GIT_STREAM_RDONLY = (1 << 1),
+ GIT_STREAM_WRONLY = (1 << 2),
+ GIT_STREAM_RW = (GIT_STREAM_RDONLY | GIT_STREAM_WRONLY),
+};
+
/** A stream to read/write from a backend */
struct git_odb_stream {
struct git_odb_backend *backend;
@@ -85,13 +92,6 @@ struct git_odb_stream {
void (*free)(struct git_odb_stream *stream);
};
-/** Streaming mode */
-typedef enum {
- GIT_STREAM_RDONLY = (1 << 1),
- GIT_STREAM_WRONLY = (1 << 2),
- GIT_STREAM_RW = (GIT_STREAM_RDONLY | GIT_STREAM_WRONLY),
-} git_odb_streammode;
-
GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir);
GIT_EXTERN(int) git_odb_backend_loose(git_odb_backend **backend_out, const char *objects_dir, int compression_level, int do_fsync);
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 9abc32369..2760f9457 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -111,7 +111,7 @@ GIT_EXTERN(const char *) git_reference_target(git_reference *ref);
* @param ref The reference
* @return the type
*/
-GIT_EXTERN(git_rtype) git_reference_type(git_reference *ref);
+GIT_EXTERN(git_ref_t) git_reference_type(git_reference *ref);
/**
* Get the full name of a reference
diff --git a/include/git2/status.h b/include/git2/status.h
index 0130b4011..caa350325 100644
--- a/include/git2/status.h
+++ b/include/git2/status.h
@@ -19,19 +19,19 @@
*/
GIT_BEGIN_DECL
-#define GIT_STATUS_CURRENT 0
+enum {
+ GIT_STATUS_CURRENT = 0,
-/** Flags for index status */
-#define GIT_STATUS_INDEX_NEW (1 << 0)
-#define GIT_STATUS_INDEX_MODIFIED (1 << 1)
-#define GIT_STATUS_INDEX_DELETED (1 << 2)
+ GIT_STATUS_INDEX_NEW = (1 << 0),
+ GIT_STATUS_INDEX_MODIFIED = (1 << 1),
+ GIT_STATUS_INDEX_DELETED = (1 << 2),
-/** Flags for worktree status */
-#define GIT_STATUS_WT_NEW (1 << 3)
-#define GIT_STATUS_WT_MODIFIED (1 << 4)
-#define GIT_STATUS_WT_DELETED (1 << 5)
+ GIT_STATUS_WT_NEW = (1 << 3),
+ GIT_STATUS_WT_MODIFIED = (1 << 4),
+ GIT_STATUS_WT_DELETED = (1 << 5),
-#define GIT_STATUS_IGNORED (1 << 6)
+ GIT_STATUS_IGNORED = (1 << 6),
+};
/**
* Gather file statuses and run a callback for each one.
@@ -97,11 +97,14 @@ typedef enum {
* slash on the entry name). Given this flag, the directory
* itself will not be included, but all the files in it will.
*/
-#define GIT_STATUS_OPT_INCLUDE_UNTRACKED (1 << 0)
-#define GIT_STATUS_OPT_INCLUDE_IGNORED (1 << 1)
-#define GIT_STATUS_OPT_INCLUDE_UNMODIFIED (1 << 2)
-#define GIT_STATUS_OPT_EXCLUDE_SUBMODULES (1 << 3)
-#define GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS (1 << 4)
+
+enum {
+ GIT_STATUS_OPT_INCLUDE_UNTRACKED = (1 << 0),
+ GIT_STATUS_OPT_INCLUDE_IGNORED = (1 << 1),
+ GIT_STATUS_OPT_INCLUDE_UNMODIFIED = (1 << 2),
+ GIT_STATUS_OPT_EXCLUDE_SUBMODULED = (1 << 3),
+ GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = (1 << 4),
+};
/**
* Options to control how callbacks will be made by
diff --git a/include/git2/types.h b/include/git2/types.h
index 98eea5374..cfb0acf33 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -158,13 +158,13 @@ typedef enum {
GIT_REF_PACKED = 4,
GIT_REF_HAS_PEEL = 8,
GIT_REF_LISTALL = GIT_REF_OID|GIT_REF_SYMBOLIC|GIT_REF_PACKED,
-} git_rtype;
+} git_ref_t;
/** Basic type of any Git branch. */
typedef enum {
GIT_BRANCH_LOCAL = 1,
GIT_BRANCH_REMOTE = 2,
-} git_branch_type;
+} git_branch_t;
typedef struct git_refspec git_refspec;
typedef struct git_remote git_remote;