author | Lars Hjemli <hjemli@gmail.com> | 2006-12-12 23:13:27 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2006-12-12 23:13:27 (UTC) |
commit | 06fe0c2f47eaf467db8ab1443e61dfa1c280f30a (patch) (unidiff) | |
tree | 481164eeeeb5ca3302f7b3d38d1debbad9db9296 /git.h | |
parent | 58d04f6523b0029281d65f841859fa42d0c744ff (diff) | |
download | cgit-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.zip cgit-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.tar.gz cgit-06fe0c2f47eaf467db8ab1443e61dfa1c280f30a.tar.bz2 |
Add display of tree content w/ui-tree.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | git.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 | ||