* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
+
+#include "common.h"
+
#include "git2/sys/hashsig.h"
-#include "fileops.h"
+#include "futils.h"
#include "util.h"
typedef uint32_t hashsig_t;
{
if (sig->mins.size < HASHSIG_HEAP_MIN_SIZE &&
!(sig->opt & GIT_HASHSIG_ALLOW_SMALL_FILES)) {
- giterr_set(GITERR_INVALID,
+ git_error_set(GIT_ERROR_INVALID,
"file too small for similarity signature calculation");
return GIT_EBUFS;
}
int error;
hashsig_in_progress prog;
git_hashsig *sig = hashsig_alloc(opts);
- GITERR_CHECK_ALLOC(sig);
+ GIT_ERROR_CHECK_ALLOC(sig);
hashsig_in_progress_init(&prog, sig);
int error = 0, fd;
hashsig_in_progress prog;
git_hashsig *sig = hashsig_alloc(opts);
- GITERR_CHECK_ALLOC(sig);
+ GIT_ERROR_CHECK_ALLOC(sig);
if ((fd = git_futils_open_ro(path)) < 0) {
git__free(sig);
while (!error) {
if ((buflen = p_read(fd, buf, sizeof(buf))) <= 0) {
if ((error = (int)buflen) < 0)
- giterr_set(GITERR_OS,
+ git_error_set(GIT_ERROR_OS,
"read error on '%s' calculating similarity hashes", path);
break;
}