Re: [PATCH 16/27] sha1_file: add repository argument to sha1_file_name
- From
Stefan Beller <sbeller@google.com>
- Date
- Feb 23, 2018, 22:36 UTC
- Message-ID
- <CAGZ79kZess5QJL1RuV+qmUYtLoY0q0EJkvRF1rZPWeScFcRz_w@mail.gmail.com>
- In-Reply-To
- <20180222005149.GH127348@google.com>
On Wed, Feb 21, 2018 at 4:51 PM, Brandon Williams <bmwill@google.com> wrote:
Show 15 quoted lines
> On 02/20, Stefan Beller wrote: >> Add a repository argument to allow sha1_file_name callers to be more >> specific about which repository to handle. This is a small mechanical >> change; it doesn't change the implementation to handle repositories >> other than the_repository yet. >> >> As with the previous commits, use a macro to catch callers passing a >> repository other than the_repository at compile time. >> >> While at it, move the declaration to object-store.h, where it should >> be easier to find. > > Seems like we may want to make a sha1-file.h or an oid-file.h or > something like that at some point as that seems like a better place for > the function than in the object-store.h file?
It depends what our long term goal is. Do we want header and source file name to match for each function? Or do we want a coarser set of headers, such that we have a broad object-store.h, but that is implemented in sha1_file.c, packfile.c for the parts of the raw_objectstore and other .c files for the higher levels of the object store?
For now I'd just keep it in object-store.h as moving out just a couple functions seems less consistent?
Stefan