Re: [PATCH 042/194] object-store: move alternates API to new alternates.h
- From
Stefan Beller <sbeller@google.com>
- Date
- Feb 6, 2018, 17:53 UTC
- Message-ID
- <CAGZ79kbycmoA1DUVEoMAzvmyT3zMtTPFBOV6AGm_-xACDePETA@mail.gmail.com>
- In-Reply-To
- <20180206014457.GE7904@genre.crustytoothpaste.net>
On Mon, Feb 5, 2018 at 5:44 PM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 49 quoted lines
> On Mon, Feb 05, 2018 at 03:55:03PM -0800, Stefan Beller wrote:
>> From: Jonathan Nieder <jrnieder@gmail.com>
>>
>> This should make these functions easier to find and object-store.h
>> less overwhelming to read.
>>
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
>> ---
>> 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