summaryrefslogtreecommitdiff
path: root/include/git2/status.h
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-18 13:53:38 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-18 13:53:38 -0700
commit59d91979d87b8d355696a943f562eb326cee6c38 (patch)
tree4b76f8371ecb965d3d40423166c73e22db19e272 /include/git2/status.h
parent498b72eb6fdc8b34c1d52b6bb09ba8a198f86666 (diff)
parent904b67e69fa15b7a3246e43b3d78645ffa2331f6 (diff)
downloadlibgit2-59d91979d87b8d355696a943f562eb326cee6c38.tar.gz
Merge pull request #710 from libgit2/breaking-changes
Break everything before the release
Diffstat (limited to 'include/git2/status.h')
-rw-r--r--include/git2/status.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/include/git2/status.h b/include/git2/status.h
index 0130b4011..6a424dfd6 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
@@ -130,7 +133,7 @@ GIT_EXTERN(int) git_status_foreach_ext(
* @param path the file to retrieve status for, rooted at the repo's workdir
* @return GIT_EINVALIDPATH when `path` points at a folder, GIT_ENOTFOUND when
* the file doesn't exist in any of HEAD, the index or the worktree,
- * GIT_SUCCESS otherwise
+ * 0 otherwise
*/
GIT_EXTERN(int) git_status_file(
unsigned int *status_flags,