Blame


1 68823f7f 2018-01-19 stsp /*
2 68823f7f 2018-01-19 stsp * Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 68823f7f 2018-01-19 stsp *
4 68823f7f 2018-01-19 stsp * Permission to use, copy, modify, and distribute this software for any
5 68823f7f 2018-01-19 stsp * purpose with or without fee is hereby granted, provided that the above
6 68823f7f 2018-01-19 stsp * copyright notice and this permission notice appear in all copies.
7 68823f7f 2018-01-19 stsp *
8 68823f7f 2018-01-19 stsp * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 68823f7f 2018-01-19 stsp * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 68823f7f 2018-01-19 stsp * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 68823f7f 2018-01-19 stsp * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 68823f7f 2018-01-19 stsp * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 68823f7f 2018-01-19 stsp * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 68823f7f 2018-01-19 stsp * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 68823f7f 2018-01-19 stsp */
16 68823f7f 2018-01-19 stsp
17 68823f7f 2018-01-19 stsp struct got_object {
18 68823f7f 2018-01-19 stsp int type;
19 68823f7f 2018-01-19 stsp int flags;
20 68823f7f 2018-01-19 stsp #define GOT_OBJ_FLAG_PACKED 0x01
21 96f5e8b3 2018-01-23 stsp #define GOT_OBJ_FLAG_DELTIFIED 0x02
22 68823f7f 2018-01-19 stsp
23 68823f7f 2018-01-19 stsp size_t hdrlen;
24 68823f7f 2018-01-19 stsp size_t size;
25 68823f7f 2018-01-19 stsp struct got_object_id id;
26 68823f7f 2018-01-19 stsp
27 68823f7f 2018-01-19 stsp char *path_packfile; /* if packed */
28 68823f7f 2018-01-19 stsp off_t pack_offset; /* if packed */
29 96f5e8b3 2018-01-23 stsp struct got_delta_chain deltas; /* if deltified */
30 68823f7f 2018-01-19 stsp };