diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-17 10:40:13 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-17 10:54:03 +0000 |
commit | cd350852206481e984f7847a903de8d350ad7bf1 (patch) | |
tree | 8d175334bc10172bcd2e28052517771a492ad16d /src/odb.c | |
parent | 90046899572f7230ceeab5fef3a909f53f817ba1 (diff) | |
download | libgit2-cd350852206481e984f7847a903de8d350ad7bf1.tar.gz |
object_type: GIT_OBJECT_BAD is now GIT_OBJECT_INVALID
We use the term "invalid" to refer to bad or malformed data, eg
`GIT_REF_INVALID` and `GIT_EINVALIDSPEC`. Since we're changing the
names of the `git_object_t`s in this release, update it to be
`GIT_OBJECT_INVALID` instead of `BAD`.
Diffstat (limited to 'src/odb.c')
-rw-r--r-- | src/odb.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,7 +63,7 @@ static git_object_t odb_hardcoded_type(const git_oid *id) if (!git_oid_cmp(id, &empty_tree)) return GIT_OBJECT_TREE; - return GIT_OBJECT_BAD; + return GIT_OBJECT_INVALID; } static int odb_read_hardcoded(bool *found, git_rawobj *raw, const git_oid *id) @@ -72,7 +72,7 @@ static int odb_read_hardcoded(bool *found, git_rawobj *raw, const git_oid *id) *found = false; - if ((type = odb_hardcoded_type(id)) == GIT_OBJECT_BAD) + if ((type = odb_hardcoded_type(id)) == GIT_OBJECT_INVALID) return 0; raw->type = type; @@ -945,7 +945,7 @@ static int odb_read_header_1( bool passthrough = false; int error; - if (!only_refreshed && (ht = odb_hardcoded_type(id)) != GIT_OBJECT_BAD) { + if (!only_refreshed && (ht = odb_hardcoded_type(id)) != GIT_OBJECT_INVALID) { *type_p = ht; *len_p = 0; return 0; |