|
diff --git a/git.h b/git.h index dfa3542..a3f977c 100644 --- a/ git.h+++ b/ git.h |
|
@@ -167,48 +167,61 @@ struct object_array { |
167 | |
167 | |
168 | /* |
168 | /* |
169 | * The object type is stored in 3 bits. |
169 | * The object type is stored in 3 bits. |
170 | */ |
170 | */ |
171 | struct object { |
171 | struct object { |
172 | unsigned parsed : 1; |
172 | unsigned parsed : 1; |
173 | unsigned used : 1; |
173 | unsigned used : 1; |
174 | unsigned type : TYPE_BITS; |
174 | unsigned type : TYPE_BITS; |
175 | unsigned flags : FLAG_BITS; |
175 | unsigned flags : FLAG_BITS; |
176 | unsigned char sha1[20]; |
176 | unsigned char sha1[20]; |
177 | }; |
177 | }; |
178 | |
178 | |
179 | |
179 | |
180 | /* |
180 | /* |
181 | * from git:tree.h |
181 | * from git:tree.h |
182 | */ |
182 | */ |
183 | |
183 | |
184 | struct tree { |
184 | struct tree { |
185 | struct object object; |
185 | struct object object; |
186 | void *buffer; |
186 | void *buffer; |
187 | unsigned long size; |
187 | unsigned long size; |
188 | }; |
188 | }; |
189 | |
189 | |
190 | |
190 | |
| |
191 | struct tree *lookup_tree(const unsigned char *sha1); |
| |
192 | int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size); |
| |
193 | int parse_tree(struct tree *tree); |
| |
194 | struct tree *parse_tree_indirect(const unsigned char *sha1); |
| |
195 | |
| |
196 | typedef int (*read_tree_fn_t)(const unsigned char *, const char *, int, const char *, unsigned int, int); |
| |
197 | |
| |
198 | extern int read_tree_recursive(struct tree *tree, |
| |
199 | const char *base, int baselen, |
| |
200 | int stage, const char **match, |
| |
201 | read_tree_fn_t fn); |
| |
202 | |
| |
203 | extern int read_tree(struct tree *tree, int stage, const char **paths); |
191 | |
204 | |
192 | |
205 | |
193 | /* from git:commit.h */ |
206 | /* from git:commit.h */ |
194 | |
207 | |
195 | struct commit_list { |
208 | struct commit_list { |
196 | struct commit *item; |
209 | struct commit *item; |
197 | struct commit_list *next; |
210 | struct commit_list *next; |
198 | }; |
211 | }; |
199 | |
212 | |
200 | struct commit { |
213 | struct commit { |
201 | struct object object; |
214 | struct object object; |
202 | void *util; |
215 | void *util; |
203 | unsigned long date; |
216 | unsigned long date; |
204 | struct commit_list *parents; |
217 | struct commit_list *parents; |
205 | struct tree *tree; |
218 | struct tree *tree; |
206 | char *buffer; |
219 | char *buffer; |
207 | }; |
220 | }; |
208 | |
221 | |
209 | |
222 | |
210 | struct commit *lookup_commit(const unsigned char *sha1); |
223 | struct commit *lookup_commit(const unsigned char *sha1); |
211 | struct commit *lookup_commit_reference(const unsigned char *sha1); |
224 | struct commit *lookup_commit_reference(const unsigned char *sha1); |
212 | struct commit *lookup_commit_reference_gently(const unsigned char *sha1, |
225 | struct commit *lookup_commit_reference_gently(const unsigned char *sha1, |
213 | int quiet); |
226 | int quiet); |
214 | |
227 | |
|