git_hashsig_create

Compute a similarity signature for a text buffer

If you have passed the option git_hashsig_option_t.GIT_HASHSIG_IGNORE_WHITESPACE, then the whitespace will be removed from the buffer while it is being processed, modifying the buffer in place. Sorry about that!

package extern (C) nothrow @nogc
int
git_hashsig_create

Parameters

out_ .git_hashsig**

The computed similarity signature.

buf const(char)*

The input buffer.

buflen size_t

The input buffer size.

opts .git_hashsig_option_t

The signature computation options (see above).

Return Value

Type: int

0 on success, git_error_code.GIT_EBUFS if the buffer doesn't contain enough data to compute a valid signature (unless git_hashsig_option_t.GIT_HASHSIG_ALLOW_SMALL_FILES is set), or error code.

Meta