~ubuntu-branches/ubuntu/intrepid/git-core/intrepid-updates

« back to all changes in this revision

Viewing changes to object.h

  • Committer: Package Import Robot
  • Author(s): Gerrit Pape
  • Date: 2007-04-22 13:31:05 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20070422133105-tkmhz328g2p0epz1
Tags: 1:1.5.1.2-1
* new upstream point release.
* debian/changelog.upstream: upstream changes taken from mailing list
  announcement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
};
37
37
 
38
38
extern int track_object_refs;
39
 
extern const char *type_names[9];
 
39
 
 
40
extern const char *typename(unsigned int type);
 
41
extern int type_from_string(const char *str);
40
42
 
41
43
extern unsigned int get_max_object_index(void);
42
44
extern struct object *get_indexed_object(unsigned int);
43
 
 
44
 
static inline const char *typename(unsigned int type)
45
 
{
46
 
        return type_names[type > OBJ_BAD ? OBJ_BAD : type];
47
 
}
48
 
 
49
45
extern struct object_refs *lookup_object_refs(struct object *);
50
46
 
51
47
/** Internal only **/
52
48
struct object *lookup_object(const unsigned char *sha1);
53
49
 
54
 
/** Returns the object, having looked it up as being the given type. **/
55
 
struct object *lookup_object_type(const unsigned char *sha1, const char *type);
56
 
 
57
50
void created_object(const unsigned char *sha1, struct object *obj);
58
51
 
59
52
/** Returns the object, having parsed it to find out what it is. **/
63
56
 * parsing it.  eaten_p indicates if the object has a borrowed copy
64
57
 * of buffer and the caller should not free() it.
65
58
 */
66
 
struct object *parse_object_buffer(const unsigned char *sha1, const char *type, unsigned long size, void *buffer, int *eaten_p);
 
59
struct object *parse_object_buffer(const unsigned char *sha1, enum object_type type, unsigned long size, void *buffer, int *eaten_p);
67
60
 
68
61
/** Returns the object, with potentially excess memory allocated. **/
69
62
struct object *lookup_unknown_object(const unsigned  char *sha1);