Skip to content

Commit 9ba610a

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#4096 from mplough/master
Update docs for git_oid_fromstrn and p
2 parents dad3c31 + 921493c commit 9ba610a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

include/git2/oid.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,16 @@ GIT_EXTERN(int) git_oid_fromstr(git_oid *out, const char *str);
5050
* Parse a hex formatted null-terminated string into a git_oid.
5151
*
5252
* @param out oid structure the result is written into.
53-
* @param str input hex string; must be at least 4 characters
54-
* long and null-terminated.
53+
* @param str input hex string; must be null-terminated.
5554
* @return 0 or an error code
5655
*/
5756
GIT_EXTERN(int) git_oid_fromstrp(git_oid *out, const char *str);
5857

5958
/**
60-
* Parse N characters of a hex formatted object id into a git_oid
59+
* Parse N characters of a hex formatted object id into a git_oid.
6160
*
62-
* If N is odd, N-1 characters will be parsed instead.
63-
* The remaining space in the git_oid will be set to zero.
61+
* If N is odd, the last byte's high nibble will be read in and the
62+
* low nibble set to zero.
6463
*
6564
* @param out oid structure the result is written into.
6665
* @param str input hex string of at least size `length`

0 commit comments

Comments
 (0)