libgit2

git_hashsig_create

Version:

Build a similarity signature for a buffer

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

This will return an error if the buffer doesn't contain enough data to compute a valid signature.

Signature

int git_hashsig_create(git_hashsig **out, const char *buf, size_t buflen, git_hashsig_option_t opts);

Parameters

In
out

The array of hashed runs representing the file content

const char *
In
buf

The contents of the file to hash

size_t
In
buflen

The length of the data at buf

Returns

int

Versions