Merge pull request #2613 from libgit2/rb/minor-cleanups Minor cleanups for master
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
diff --git a/include/git2/common.h b/include/git2/common.h
index ddeaf77..1363316 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -83,8 +83,6 @@ GIT_BEGIN_DECL
*/
#define GIT_OID_HEX_ZERO "0000000000000000000000000000000000000000"
-#define FLAG_BITS 27
-
/**
* Return the version of the libgit2 library
* being currently used.
diff --git a/src/commit_list.h b/src/commit_list.h
index 7cd3945..6b3f473 100644
--- a/src/commit_list.h
+++ b/src/commit_list.h
@@ -18,6 +18,8 @@
#define COMMIT_ALLOC \
(sizeof(git_commit_list_node) + PARENTS_PER_COMMIT * sizeof(git_commit_list_node *))
+#define FLAG_BITS 4
+
typedef struct git_commit_list_node {
git_oid oid;
uint32_t time;
diff --git a/src/describe.c b/src/describe.c
index 08c99a7..024b9db 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -29,7 +29,7 @@ struct commit_name {
char *path;
/* Khash workaround. They original key has to still be reachable */
- git_oid peeled;
+ git_oid peeled;
};
static void *oidmap_value_bykey(git_oidmap *map, const git_oid *key)
diff --git a/tests/describe/describe_helpers.c b/tests/describe/describe_helpers.c
index 7a6a73c..ad9c945 100644
--- a/tests/describe/describe_helpers.c
+++ b/tests/describe/describe_helpers.c
@@ -16,7 +16,7 @@ void assert_describe(
cl_git_pass(git_describe_commit(&result, object, opts));
cl_git_pass(git_describe_format(&label, result, fmt_opts));
- cl_git_pass(p_fnmatch(expected_output, git_buf_cstr(&label), 0));
+ cl_must_pass(p_fnmatch(expected_output, git_buf_cstr(&label), 0));
git_describe_result_free(result);
git_object_free(object);
@@ -35,7 +35,7 @@ void assert_describe_workdir(
cl_git_pass(git_describe_workdir(&result, repo, opts));
cl_git_pass(git_describe_format(&label, result, fmt_opts));
- cl_git_pass(p_fnmatch(expected_output, git_buf_cstr(&label), 0));
+ cl_must_pass(p_fnmatch(expected_output, git_buf_cstr(&label), 0));
git_describe_result_free(result);
git_buf_free(&label);