diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-04-16 19:46:41 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-16 19:46:41 +0400 |
commit | a50086d174658914d4d6462afbc83b02825b1f5b (patch) | |
tree | e8daa1c7bf678222cf351445179837bed7db3a72 /src/delta-apply.h | |
parent | 5b9fac39d8a76b9139667c26a63e6b3f204b3977 (diff) | |
parent | f124ebd457bfbf43de3516629aaba5a279636e04 (diff) |
Merge branch 'development'v0.18.0
Diffstat (limited to 'src/delta-apply.h')
-rw-r--r-- | src/delta-apply.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/delta-apply.h b/src/delta-apply.h index 66fa76d43..d7d99d04c 100644 --- a/src/delta-apply.h +++ b/src/delta-apply.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2012 the libgit2 contributors + * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. @@ -30,4 +30,21 @@ extern int git__delta_apply( const unsigned char *delta, size_t delta_len); +/** + * Read the header of a git binary delta. + * + * @param delta the delta to execute copy/insert instructions from. + * @param delta_len total number of bytes in the delta. + * @param base_sz pointer to store the base size field. + * @param res_sz pointer to store the result size field. + * @return + * - 0 on a successful decoding the header. + * - GIT_ERROR if the delta is corrupt. + */ +extern int git__delta_read_header( + const unsigned char *delta, + size_t delta_len, + size_t *base_sz, + size_t *res_sz); + #endif |