Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-07-09 04:25:01 +0400
committerCarlos Martín Nieto <carlos@cmartin.tk>2011-08-02 23:42:03 +0400
commit7d0cdf82be73ea8c0dce07e5e0ed3c7fdcd4707e (patch)
treecc467dc0e29c52fbeb4663285150f470fee58ec1 /src/pack.h
parentab525a7463492aa64c936b59165ab33f6264f1a8 (diff)
Make packfile_unpack_header more generic
On the way, store the fd and the size in the mwindow file. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'src/pack.h')
-rw-r--r--src/pack.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/pack.h b/src/pack.h
index a5525459e..732f88b4a 100644
--- a/src/pack.h
+++ b/src/pack.h
@@ -31,6 +31,7 @@
#include "common.h"
#include "map.h"
#include "mwindow.h"
+#include "odb.h"
#define PACK_SIGNATURE 0x5041434b /* "PACK" */
#define PACK_VERSION 2
@@ -67,9 +68,7 @@ struct pack_idx_header {
};
struct pack_file {
- int pack_fd;
git_mwindow_file mwf;
- off_t pack_size;
git_map index_map;
uint32_t num_objects;
@@ -91,4 +90,29 @@ struct pack_entry {
struct pack_file *p;
};
+static unsigned char *pack_window_open(struct pack_file *p,
+ git_mwindow **w_cursor, off_t offset, unsigned int *left);
+
+int git_packfile_unpack_header(
+ size_t *size_p,
+ git_otype *type_p,
+ git_mwindow_file *mwf,
+ git_mwindow **w_curs,
+ off_t *curpos);
+
+int packfile_unpack_delta(
+ git_rawobj *obj,
+ struct pack_file *p,
+ git_mwindow **w_curs,
+ off_t curpos,
+ size_t delta_size,
+ git_otype delta_type,
+ off_t obj_offset);
+
+int packfile_unpack(git_rawobj *obj, struct pack_file *p, off_t obj_offset);
+
+off_t get_delta_base(struct pack_file *p, git_mwindow **w_curs,
+ off_t *curpos, git_otype type,
+ off_t delta_obj_offset);
+
#endif