diff: Fix rebase breackage
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 62 63 64 65 66 67
diff --git a/src/attr.c b/src/attr.c
index 603498d..0aa1e32 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -235,7 +235,7 @@ int git_attr_cache__lookup_or_create_file(
return GIT_SUCCESS;
}
- if (loader && git_path_exists(filename) != GIT_SUCCESS) {
+ if (loader && git_path_exists(filename) == false) {
*file_ptr = NULL;
return GIT_SUCCESS;
}
diff --git a/src/iterator.c b/src/iterator.c
index c026c3c..0ce89df 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -440,7 +440,7 @@ static int workdir_iterator__update_entry(workdir_iterator *wi)
/* detect submodules */
if (S_ISDIR(wi->entry.mode) &&
- git_path_contains(&wi->path, DOT_GIT) == GIT_SUCCESS)
+ git_path_contains(&wi->path, DOT_GIT) == true)
wi->entry.mode = S_IFGITLINK;
return GIT_SUCCESS;
diff --git a/src/odb_loose.c b/src/odb_loose.c
index 6546fa8..2dd7004 100644
--- a/src/odb_loose.c
+++ b/src/odb_loose.c
@@ -480,7 +480,7 @@ static int fn_locate_object_short_oid(void *state, git_buf *pathbuf) {
return GIT_SUCCESS;
}
- if (git_path_isdir(pathbuf->ptr) == true) {
+ if (git_path_isdir(pathbuf->ptr) == false) {
/* We are already in the directory matching the 2 first hex characters,
* compare the first ncmp characters of the oids */
if (!memcmp(sstate->short_oid + 2,
diff --git a/src/repository.c b/src/repository.c
index fe785cf..e274252 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -171,7 +171,7 @@ int git_repository_open(git_repository **repo_out, const char *path)
* of the working dir, by testing if it contains a `.git`
* folder inside of it.
*/
- if (git_path_contains_dir(&path_buf, GIT_DIR) == GIT_SUCCESS)
+ if (git_path_contains_dir(&path_buf, GIT_DIR) == true)
git_buf_joinpath(&path_buf, path_buf.ptr, GIT_DIR);
if (quickcheck_repository_dir(&path_buf) < GIT_SUCCESS) {
diff --git a/tests-clar/diff/diff_helpers.c b/tests-clar/diff/diff_helpers.c
index d8eca7d..055bd4b 100644
--- a/tests-clar/diff/diff_helpers.c
+++ b/tests-clar/diff/diff_helpers.c
@@ -7,8 +7,8 @@ git_tree *resolve_commit_oid_to_tree(
{
size_t len = strlen(partial_oid);
git_oid oid;
- git_object *obj;
- git_tree *tree;
+ git_object *obj = NULL;
+ git_tree *tree = NULL;
if (git_oid_fromstrn(&oid, partial_oid, len) == 0)
git_object_lookup_prefix(&obj, repo, &oid, len, GIT_OBJ_ANY);