aboutsummaryrefslogtreecommitdiff
path: root/csum-file.h
diff options
context:
space:
mode:
Diffstat (limited to 'csum-file.h')
-rw-r--r--csum-file.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/csum-file.h b/csum-file.h
index 07ae11024a..a9b390d336 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -45,12 +45,24 @@ int hashfile_truncate(struct hashfile *, struct hashfile_checkpoint *);
#define CSUM_FSYNC 2
#define CSUM_HASH_IN_STREAM 4
+struct hashfd_options {
+ /*
+ * Throughput progress that counts the number of bytes that have been
+ * hashed.
+ */
+ struct progress *progress;
+
+ /* The length of the buffer that shall be used read read data. */
+ size_t buffer_len;
+};
+
+struct hashfile *hashfd_ext(const struct git_hash_algo *algop,
+ int fd, const char *name,
+ const struct hashfd_options *opts);
struct hashfile *hashfd(const struct git_hash_algo *algop,
int fd, const char *name);
struct hashfile *hashfd_check(const struct git_hash_algo *algop,
const char *name);
-struct hashfile *hashfd_throughput(const struct git_hash_algo *algop,
- int fd, const char *name, struct progress *tp);
/*
* Free the hashfile without flushing its contents to disk. This only
@@ -63,7 +75,7 @@ void free_hashfile(struct hashfile *f);
*/
int finalize_hashfile(struct hashfile *, unsigned char *, enum fsync_component, unsigned int);
void discard_hashfile(struct hashfile *);
-void hashwrite(struct hashfile *, const void *, unsigned int);
+void hashwrite(struct hashfile *, const void *, uint32_t);
void hashflush(struct hashfile *f);
void crc32_begin(struct hashfile *);
uint32_t crc32_end(struct hashfile *);