Web lists-archives.com

Re: [PATCH 042/194] object-store: move alternates API to new alternates.h




On Mon, Feb 5, 2018 at 5:44 PM, brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Feb 05, 2018 at 03:55:03PM -0800, Stefan Beller wrote:
>> From: Jonathan Nieder <jrnieder@xxxxxxxxx>
>>
>> This should make these functions easier to find and object-store.h
>> less overwhelming to read.
>>
>> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
>> Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
>> ---
>>  alternates.h                | 68 +++++++++++++++++++++++++++++++++++++++++++++
>>  builtin/clone.c             |  1 +
>>  builtin/count-objects.c     |  1 +
>>  builtin/fsck.c              |  3 +-
>>  builtin/grep.c              |  1 +
>>  builtin/submodule--helper.c |  1 +
>>  cache.h                     | 52 ----------------------------------
>>  object-store.h              | 16 +++++------
>>  packfile.c                  |  3 +-
>>  sha1_file.c                 | 23 +++++++--------
>>  sha1_name.c                 |  3 +-
>>  submodule.c                 |  1 +
>>  t/helper/test-ref-store.c   |  1 +
>>  tmp-objdir.c                |  1 +
>>  transport.c                 |  1 +
>>  15 files changed, 102 insertions(+), 74 deletions(-)
>>  create mode 100644 alternates.h
>>
>> diff --git a/alternates.h b/alternates.h
>> new file mode 100644
>> index 0000000000..df5dc67e2e
>> --- /dev/null
>> +++ b/alternates.h
>> @@ -0,0 +1,68 @@
>> +#ifndef ALTERNATES_H
>> +#define ALTERNATES_H
>> +
>> +#include "strbuf.h"
>> +#include "sha1-array.h"
>> +
>> +struct alternates {
>> +     struct alternate_object_database *list;
>> +     struct alternate_object_database **tail;
>> +};
>> +#define ALTERNATES_INIT { NULL, NULL }
>
> I was surprised to find that this patch not only moves the alternates
> API to a new location, but introduces this struct.  I certainly think
> the struct is a good idea, but it should probably go in a separate
> patch, or at least get a mention in the commit message.

ok, I'll fix the commit message.

Thanks,
Stefan