@@ -225,6 +225,7 @@ GIT_EXTERN(int) git_object_peel(
225225 */
226226GIT_EXTERN (int ) git_object_dup (git_object * * dest , git_object * source );
227227
228+ #ifdef GIT_EXPERIMENTAL_SHA256
228229/**
229230 * Analyzes a buffer of raw object content and determines its validity.
230231 * Tree, commit, and tag objects will be parsed and ensured that they
@@ -238,14 +239,39 @@ GIT_EXTERN(int) git_object_dup(git_object **dest, git_object *source);
238239 * @param valid Output pointer to set with validity of the object content
239240 * @param buf The contents to validate
240241 * @param len The length of the buffer
241- * @param type The type of the object in the buffer
242+ * @param object_type The type of the object in the buffer
243+ * @param oid_type The object ID type for the OIDs in the given buffer
242244 * @return 0 on success or an error code
243245 */
244246GIT_EXTERN (int ) git_object_rawcontent_is_valid (
245247 int * valid ,
246248 const char * buf ,
247249 size_t len ,
248- git_object_t type );
250+ git_object_t object_type ,
251+ git_oid_t oid_type );
252+ #else
253+ /**
254+ * Analyzes a buffer of raw object content and determines its validity.
255+ * Tree, commit, and tag objects will be parsed and ensured that they
256+ * are valid, parseable content. (Blobs are always valid by definition.)
257+ * An error message will be set with an informative message if the object
258+ * is not valid.
259+ *
260+ * @warning This function is experimental and its signature may change in
261+ * the future.
262+ *
263+ * @param valid Output pointer to set with validity of the object content
264+ * @param buf The contents to validate
265+ * @param len The length of the buffer
266+ * @param object_type The type of the object in the buffer
267+ * @return 0 on success or an error code
268+ */
269+ GIT_EXTERN (int ) git_object_rawcontent_is_valid (
270+ int * valid ,
271+ const char * buf ,
272+ size_t len ,
273+ git_object_t object_type );
274+ #endif
249275
250276/** @} */
251277GIT_END_DECL
0 commit comments