vendor/libgit2/src/hashsig.c in rugged-0.27.10 vs vendor/libgit2/src/hashsig.c in rugged-0.27.10.1

- old
+ new

@@ -6,11 +6,11 @@ */ #include "common.h" #include "git2/sys/hashsig.h" -#include "futils.h" +#include "fileops.h" #include "util.h" typedef uint32_t hashsig_t; typedef uint64_t hashsig_state; @@ -214,11 +214,11 @@ static int hashsig_finalize_hashes(git_hashsig *sig) { if (sig->mins.size < HASHSIG_HEAP_MIN_SIZE && !(sig->opt & GIT_HASHSIG_ALLOW_SMALL_FILES)) { - git_error_set(GIT_ERROR_INVALID, + giterr_set(GITERR_INVALID, "file too small for similarity signature calculation"); return GIT_EBUFS; } hashsig_heap_sort(&sig->mins); @@ -247,11 +247,11 @@ git_hashsig_option_t opts) { int error; hashsig_in_progress prog; git_hashsig *sig = hashsig_alloc(opts); - GIT_ERROR_CHECK_ALLOC(sig); + GITERR_CHECK_ALLOC(sig); hashsig_in_progress_init(&prog, sig); error = hashsig_add_hashes(sig, (const uint8_t *)buf, buflen, &prog); @@ -274,11 +274,11 @@ uint8_t buf[0x1000]; ssize_t buflen = 0; int error = 0, fd; hashsig_in_progress prog; git_hashsig *sig = hashsig_alloc(opts); - GIT_ERROR_CHECK_ALLOC(sig); + GITERR_CHECK_ALLOC(sig); if ((fd = git_futils_open_ro(path)) < 0) { git__free(sig); return fd; } @@ -286,10 +286,10 @@ hashsig_in_progress_init(&prog, sig); while (!error) { if ((buflen = p_read(fd, buf, sizeof(buf))) <= 0) { if ((error = (int)buflen) < 0) - git_error_set(GIT_ERROR_OS, + giterr_set(GITERR_OS, "read error on '%s' calculating similarity hashes", path); break; } error = hashsig_add_hashes(sig, buf, buflen, &prog);