mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 11:19:47 +00:00
Fix Windows/Win32 warning
This commit is contained in:
parent
0b061b5bfa
commit
8cfd54f0d8
@ -394,15 +394,20 @@ static int similarity_calc(
|
||||
git_buf_free(&path);
|
||||
} else { /* compute hashsig from blob buffer */
|
||||
git_blob *blob = NULL;
|
||||
git_off_t blobsize;
|
||||
|
||||
/* TODO: add max size threshold a la diff? */
|
||||
|
||||
if ((error = git_blob_lookup(&blob, diff->repo, &file->oid)) < 0)
|
||||
return error;
|
||||
|
||||
blobsize = git_blob_rawsize(blob);
|
||||
if (!git__is_sizet(blobsize)) /* ? what to do ? */
|
||||
blobsize = (size_t)-1;
|
||||
|
||||
error = opts->metric->buffer_signature(
|
||||
&cache[file_idx], file, git_blob_rawcontent(blob),
|
||||
git_blob_rawsize(blob), opts->metric->payload);
|
||||
(size_t)blobsize, opts->metric->payload);
|
||||
|
||||
git_blob_free(blob);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user