diff options
| author | Edward Thomson <ethomson@github.com> | 2017-02-02 13:31:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-02 13:31:33 +0000 |
| commit | 9ba610a11a2ac752145cfde4e3cdd932c2e42284 (patch) | |
| tree | b72ee2de2796ea06b17b41ae4cebdbdc21db1012 | |
| parent | dad3c319d76f58bc600b53650723d0d3cc9e6feb (diff) | |
| parent | 921493cc94fa3542e6f7b2ac218a1163826f7dbc (diff) | |
| download | libgit2-9ba610a11a2ac752145cfde4e3cdd932c2e42284.tar.gz | |
Merge pull request #4096 from mplough/master
Update docs for git_oid_fromstrn and p
| -rw-r--r-- | include/git2/oid.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/git2/oid.h b/include/git2/oid.h index 8ad51c8ba..aaa678cc0 100644 --- a/include/git2/oid.h +++ b/include/git2/oid.h @@ -50,17 +50,16 @@ GIT_EXTERN(int) git_oid_fromstr(git_oid *out, const char *str); * Parse a hex formatted null-terminated string into a git_oid. * * @param out oid structure the result is written into. - * @param str input hex string; must be at least 4 characters - * long and null-terminated. + * @param str input hex string; must be null-terminated. * @return 0 or an error code */ GIT_EXTERN(int) git_oid_fromstrp(git_oid *out, const char *str); /** - * Parse N characters of a hex formatted object id into a git_oid + * Parse N characters of a hex formatted object id into a git_oid. * - * If N is odd, N-1 characters will be parsed instead. - * The remaining space in the git_oid will be set to zero. + * If N is odd, the last byte's high nibble will be read in and the + * low nibble set to zero. * * @param out oid structure the result is written into. * @param str input hex string of at least size `length` |
