Re: [PATCH 2/3] sha1_file: add the ability to parse objects in "pack file format"
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 12, 2006, 04:31 UTC
- Message-ID
- <Pine.LNX.4.64.0607112128270.5623@g5.osdl.org>
- In-Reply-To
- <Pine.LNX.4.64.0607111755180.5623@g5.osdl.org>
On Tue, 11 Jul 2006, Linus Torvalds wrote:
> > Junio: this patch is totally independent from the other patches, and is on > top of you current "master". It gets rid of TYPE_xxx in favor of the > OBJ_xxx enums, which are moved from pack.h into object.h.
...
> static inline const char *typename(unsigned int type)
> {
> - return type_names[type > TYPE_TAG ? TYPE_BAD : type];
> + return type_names[type > OBJ_TAG ? OBJ_BAD : type];That should be "[type > OBJ_BAD ? OBJ_BAD : type]"
Not that any users will care, because the current users of the typename() macro are the old TYPE_xxxx users which will never see the OBJ_DELTA case anyway. So it's not a big deal, but let's do it right for future users (ie if the pack-file things want to start using "typename(type)" and they actually _have_ delta descriptors).
Linus