diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-30 16:03:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-30 16:03:10 -0800 |
commit | 00d3278c8534a8244ae3447189401111e017fd5d (patch) | |
tree | f1c19903bc10ffe4816642040080fb6cfd5da376 /csum-file.h | |
parent | b9b727ddb3c9e005bc4e9af0b990b6ef06d7f621 (diff) | |
parent | b319ef70a94731a5c6f18d07a49d5dda3f06f5d3 (diff) | |
download | git-00d3278c8534a8244ae3447189401111e017fd5d.tar.gz git-00d3278c8534a8244ae3447189401111e017fd5d.tar.xz |
Merge commit 'b319ef7' into jc/maint-fix-test-perm
* commit 'b319ef7': (8132 commits)
Add a small patch-mode testing library
git-apply--interactive: Refactor patch mode code
t8005: Nobody writes Russian in shift_jis
Fix severe breakage in "git-apply --whitespace=fix"
Update release notes for 1.6.4
After renaming a section, print any trailing variable definitions
Make section_name_match start on '[', and return the length on success
send-email: detect cycles in alias expansion
Show the presence of untracked files in the bash prompt.
SunOS grep does not understand -C<n> nor -e
Fix export_marks() error handling.
git repack: keep commits hidden by a graft
Add a test showing that 'git repack' throws away grafted-away parents
git branch: clean up detached branch handling
git branch: avoid unnecessary object lookups
git branch: fix performance problem
git svn: fix shallow clone when upstream revision is too new
do_one_ref(): null_sha1 check is not about broken ref
configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing
janitor: useless checks before free
...
Diffstat (limited to 'csum-file.h')
-rw-r--r-- | csum-file.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/csum-file.h b/csum-file.h index 3ad1a992a..294add2a9 100644 --- a/csum-file.h +++ b/csum-file.h @@ -1,19 +1,31 @@ #ifndef CSUM_FILE_H #define CSUM_FILE_H +struct progress; + /* A SHA1-protected file */ struct sha1file { - int fd, error; - unsigned int offset, namelen; - SHA_CTX ctx; - char name[PATH_MAX]; + int fd; + unsigned int offset; + git_SHA_CTX ctx; + off_t total; + struct progress *tp; + const char *name; + int do_crc; + uint32_t crc32; unsigned char buffer[8192]; }; +/* sha1close flags */ +#define CSUM_CLOSE 1 +#define CSUM_FSYNC 2 + extern struct sha1file *sha1fd(int fd, const char *name); -extern struct sha1file *sha1create(const char *fmt, ...) __attribute__((format (printf, 1, 2))); -extern int sha1close(struct sha1file *, unsigned char *, int); +extern struct sha1file *sha1fd_throughput(int fd, const char *name, struct progress *tp); +extern int sha1close(struct sha1file *, unsigned char *, unsigned int); extern int sha1write(struct sha1file *, void *, unsigned int); -extern int sha1write_compressed(struct sha1file *, void *, unsigned int); +extern void sha1flush(struct sha1file *f); +extern void crc32_begin(struct sha1file *); +extern uint32_t crc32_end(struct sha1file *); #endif |