Subject: Re: [PATCH 2/3] git over TLS (gits://) support (part 2)

From: Andreas Ericsson <[email-masked]>
Date: Mon, 03 May 2010 11:44:04 +0200

On 05/01/2010 07:09 PM, Ilari Liusvaara wrote:

A monster-patch, if ever I saw one, yet without a sensible commit message.
What is it this patch actually does?

> +#include "base64.h"
> +#ifdef USE_COMPAT_H
> +#include "compat.h"
> +#else
> +#include "git-compat-util.h"
> +#endif
> +

This would be better moved to compat.h, so the entire file is excluded
and git-compat-util.h is included instead if we're supposed to use that
one. That way you won't have to remember this in every file you use.

> +void encode_uint32(unsigned char *ptr, unsigned long value)
> +{
> +	ptr[0] = (unsigned char)(value>>  24);
> +	ptr[1] = (unsigned char)(value>>  16);
> +	ptr[2] = (unsigned char)(value>>  8);
> +	ptr[3] = (unsigned char)(value);
> +}
> +

The second parameter should be uint32_t, obviously.

Reviewing the rest of the patch will have to wait until there's a
proper commit message describing what it's supposed to do, as I
have nowhere near enough time to try to analyze 100k worth of
code to figure out why it's necessary to add it to git.git.

-- 
Andreas Ericsson                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.