diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-08 17:28:35 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-08 17:28:35 -0500 |
commit | e2d4f89c4999327c8eb1cf47b38fab43756b6c13 (patch) | |
tree | ff7b387caad5bba97799f150b51cd972158f0de1 /examples | |
parent | e50d138e898dd034161663873f75716086266f86 (diff) | |
download | libgit2-ethomson/is_and_from.tar.gz |
oid: `is_zero` instead of `iszero`ethomson/is_and_from
The only function that is named `issomething` (without underscore) was
`git_oid_iszero`. Rename it to `git_oid_is_zero` for consistency with
the rest of the library.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/blame.c | 4 | ||||
-rw-r--r-- | examples/fetch.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/blame.c b/examples/blame.c index fa586b31e..8484c9f05 100644 --- a/examples/blame.c +++ b/examples/blame.c @@ -72,7 +72,7 @@ int lg2_blame(git_repository *repo, int argc, char *argv[]) * Get the raw data inside the blob for output. We use the * `commitish:path/to/file.txt` format to find it. */ - if (git_oid_iszero(&blameopts.newest_commit)) + if (git_oid_is_zero(&blameopts.newest_commit)) strcpy(spec, "HEAD"); else git_oid_tostr(spec, sizeof(spec), &blameopts.newest_commit); @@ -101,7 +101,7 @@ int lg2_blame(git_repository *repo, int argc, char *argv[]) if (hunk) { char sig[128] = {0}; break_on_null_hunk = 1; - + git_oid_tostr(oid, 10, &hunk->final_commit_id); snprintf(sig, 30, "%s <%s>", hunk->final_signature->name, hunk->final_signature->email); diff --git a/examples/fetch.c b/examples/fetch.c index 7f8e2317f..3b1fad11a 100644 --- a/examples/fetch.c +++ b/examples/fetch.c @@ -21,7 +21,7 @@ static int update_cb(const char *refname, const git_oid *a, const git_oid *b, vo git_oid_fmt(b_str, b); b_str[GIT_OID_HEXSZ] = '\0'; - if (git_oid_iszero(a)) { + if (git_oid_is_zero(a)) { printf("[new] %.20s %s\n", b_str, refname); } else { git_oid_fmt(a_str, a); |