@@ -73,8 +73,9 @@ GIT_EXTERN(int) git_oid_fromstrn(git_oid *out, const char *str, size_t length);
73
73
*
74
74
* @param out oid structure the result is written into.
75
75
* @param raw the raw input bytes to be copied.
76
+ * @return 0 on success or error code
76
77
*/
77
- GIT_EXTERN (void ) git_oid_fromraw (git_oid * out , const unsigned char * raw );
78
+ GIT_EXTERN (int ) git_oid_fromraw (git_oid * out , const unsigned char * raw );
78
79
79
80
/**
80
81
* Format a git_oid into a hex string.
@@ -85,8 +86,9 @@ GIT_EXTERN(void) git_oid_fromraw(git_oid *out, const unsigned char *raw);
85
86
* oid digits are written; a '\\0' terminator must be added
86
87
* by the caller if it is required.
87
88
* @param id oid structure to format.
89
+ * @return 0 on success or error code
88
90
*/
89
- GIT_EXTERN (void ) git_oid_fmt (char * out , const git_oid * id );
91
+ GIT_EXTERN (int ) git_oid_fmt (char * out , const git_oid * id );
90
92
91
93
/**
92
94
* Format a git_oid into a partial hex string.
@@ -96,8 +98,9 @@ GIT_EXTERN(void) git_oid_fmt(char *out, const git_oid *id);
96
98
* will be zeroed; if not, a '\0' terminator is NOT added.
97
99
* @param n number of characters to write into out string
98
100
* @param id oid structure to format.
101
+ * @return 0 on success or error code
99
102
*/
100
- GIT_EXTERN (void ) git_oid_nfmt (char * out , size_t n , const git_oid * id );
103
+ GIT_EXTERN (int ) git_oid_nfmt (char * out , size_t n , const git_oid * id );
101
104
102
105
/**
103
106
* Format a git_oid into a loose-object path string.
@@ -111,8 +114,9 @@ GIT_EXTERN(void) git_oid_nfmt(char *out, size_t n, const git_oid *id);
111
114
* oid digits are written; a '\\0' terminator must be added
112
115
* by the caller if it is required.
113
116
* @param id oid structure to format.
117
+ * @return 0 on success, non-zero callback return value, or error code
114
118
*/
115
- GIT_EXTERN (void ) git_oid_pathfmt (char * out , const git_oid * id );
119
+ GIT_EXTERN (int ) git_oid_pathfmt (char * out , const git_oid * id );
116
120
117
121
/**
118
122
* Format a git_oid into a statically allocated c-string.
@@ -151,8 +155,9 @@ GIT_EXTERN(char *) git_oid_tostr(char *out, size_t n, const git_oid *id);
151
155
*
152
156
* @param out oid structure the result is written into.
153
157
* @param src oid structure to copy from.
158
+ * @return 0 on success or error code
154
159
*/
155
- GIT_EXTERN (void ) git_oid_cpy (git_oid * out , const git_oid * src );
160
+ GIT_EXTERN (int ) git_oid_cpy (git_oid * out , const git_oid * src );
156
161
157
162
/**
158
163
* Compare two oid structures.
0 commit comments