File tree Expand file tree Collapse file tree 4 files changed +87
-0
lines changed
Expand file tree Collapse file tree 4 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 1+ #ifndef BLOB_H
2+ #define BLOB_H
3+
4+ #include "object.h"
5+
6+ extern const char * blob_type ;
7+
8+ struct blob {
9+ struct object object ;
10+ };
11+
12+ struct blob * lookup_blob (unsigned char * sha1 );
13+
14+ #endif /* BLOB_H */
Original file line number Diff line number Diff line change 1+ #ifndef COMMIT_H
2+ #define COMMIT_H
3+
4+ #include "object.h"
5+ #include "tree.h"
6+
7+ struct commit_list {
8+ struct commit * item ;
9+ struct commit_list * next ;
10+ };
11+
12+ struct commit {
13+ struct object object ;
14+ unsigned long date ;
15+ struct commit_list * parents ;
16+ struct tree * tree ;
17+ };
18+
19+ extern const char * commit_type ;
20+
21+ struct commit * lookup_commit (unsigned char * sha1 );
22+
23+ int parse_commit (struct commit * item );
24+
25+ void free_commit_list (struct commit_list * list );
26+
27+ #endif /* COMMIT_H */
Original file line number Diff line number Diff line change 1+ #ifndef OBJECT_H
2+ #define OBJECT_H
3+
4+ struct object_list {
5+ struct object * item ;
6+ struct object_list * next ;
7+ };
8+
9+ struct object {
10+ unsigned parsed : 1 ;
11+ unsigned used : 1 ;
12+ unsigned int flags ;
13+ unsigned char sha1 [20 ];
14+ const char * type ;
15+ struct object_list * refs ;
16+ };
17+
18+ int nr_objs ;
19+ struct object * * objs ;
20+
21+ struct object * lookup_object (unsigned char * sha1 );
22+
23+ void created_object (unsigned char * sha1 , struct object * obj );
24+
25+ void add_ref (struct object * refer , struct object * target );
26+
27+ void mark_reachable (struct object * obj , unsigned int mask );
28+
29+ #endif /* OBJECT_H */
Original file line number Diff line number Diff line change 1+ #ifndef TREE_H
2+ #define TREE_H
3+
4+ #include "object.h"
5+
6+ extern const char * tree_type ;
7+
8+ struct tree {
9+ struct object object ;
10+ unsigned has_full_path : 1 ;
11+ };
12+
13+ struct tree * lookup_tree (unsigned char * sha1 );
14+
15+ int parse_tree (struct tree * tree );
16+
17+ #endif /* TREE_H */
You can’t perform that action at this time.
0 commit comments