On Mon, Apr 29, 2013 at 11:42 PM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote: > diff --git a/cache.h b/cache.h > index 94ca1ac..bed403a 100644 > --- a/cache.h > +++ b/cache.h > @@ -744,12 +744,33 @@ char *strip_path_suffix(const char *path, const char *suffix); > int daemon_avoid_alias(const char *path); > int offset_1st_component(const char *path); > > +/* > + * odb origin bit mask: > + * - 8 low bits are for requested objects > + * - 8 high bits are for their base objects > + */ > +#define ODB_LOCAL 1 > +#define ODB_ALT 2 > +#define ODB_CACHED 4 > +/* > + * This flag is used to track if the origin selection is from > + * "odb_default" below. Not a real source, not to be passed to any > + * function cals explicitly. s/cals/calls/ > + */ > +#define ODB_DEFAULT 8 > + > +extern unsigned int odb_default; > + > /* object replacement */ > #define READ_SHA1_FILE_REPLACE 1 > -extern void *read_sha1_file_extended(const unsigned char *sha1, enum object_type *type, unsigned long *size, unsigned flag); > +extern void *read_sha1_file_extended(const unsigned char *sha1, > + unsigned int origin, > + enum object_type *type, > + unsigned long *size, > + unsigned flag); > static inline void *read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size) > { > - return read_sha1_file_extended(sha1, type, size, READ_SHA1_FILE_REPLACE); > + return read_sha1_file_extended(sha1, odb_default, type, size, READ_SHA1_FILE_REPLACE); > } > extern const unsigned char *do_lookup_replace_object(const unsigned char *sha1); > static inline const unsigned char *lookup_replace_object(const unsigned char *sha1) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html