Re: [PATCH] Define constants for lengths of object names
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 1, 2014, 17:20 UTC
- Message-ID
- <20140501172007.GZ9218@google.com>
- In-Reply-To
- <1398942410-112069-1-git-send-email-sandals@crustytoothpaste.net>
Hi,
brian m. carlson wrote:
> --- a/object.h > +++ b/object.h
[...]
Show 6 quoted lines
> @@ -49,7 +56,7 @@ struct object {
> unsigned used : 1;
> unsigned type : TYPE_BITS;
> unsigned flags : FLAG_BITS;
> - unsigned char sha1[20];
> + unsigned char sha1[GIT_OID_RAWSZ];Maybe my brain has been damaged by reading code from too many C projects that hard-code some constants, but I find '20' easier to read here.
What happened to the
struct object_id {
unsigned char id[20];
};...
struct object {
...
struct object_id id;
};idea?
Thanks, Jonathan