diff options
author | Russell Belfer <rb@github.com> | 2013-02-19 22:25:41 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-02-21 03:09:41 +0400 |
commit | 9bc8be3d7e5134de1d912c7ef08d6207079bd8c1 (patch) | |
tree | f4840ab516ccee1ce427201624b2deaff3d81c7b /src/hashsig.h | |
parent | a235e9d355c2188eb35efeac8147b2e8b626caa3 (diff) |
Refine pluggable similarity API
This plugs in the three basic similarity strategies for handling
whitespace via internal use of the pluggable API. In so doing, I
realized that the use of git_buf in the hashsig API was not needed
and actually just made it harder to use, so I tweaked that API as
well.
Note that the similarity metric is still not hooked up in the
find_similarity code - this is just setting out the function that
will be used.
Diffstat (limited to 'src/hashsig.h')
-rw-r--r-- | src/hashsig.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hashsig.h b/src/hashsig.h index 70b47f5f3..8c920cbf1 100644 --- a/src/hashsig.h +++ b/src/hashsig.h @@ -7,7 +7,7 @@ #ifndef INCLUDE_hashsig_h__ #define INCLUDE_hashsig_h__ -#include "buffer.h" +#include "common.h" /** * Similarity signature of line hashes for a buffer @@ -32,11 +32,13 @@ typedef enum { * * @param out The array of hashed runs representing the file content * @param buf The contents of the file to hash + * @param buflen The length of the data at `buf` * @param generate_pairwise_hashes Should pairwise runs be hashed */ extern int git_hashsig_create( git_hashsig **out, - const git_buf *buf, + const char *buf, + size_t buflen, git_hashsig_option_t opts); /** |