Re: [RFC] TODO in read-cache.c
- From
- Kapil Jain <jkapil.cs@gmail.com>
- Date
- Apr 6, 2019, 12:13 UTC
- Message-ID
- <CAMknYENJogZ6vxs3zxivD3TPtDnfE9DFQDTwri+eLJmTwr4zxw@mail.gmail.com>
- In-Reply-To
- <CACsJy8AnXawOgC0eWKpSF7iGXAvPdP9=SZX1HePRABVdkiKs8g@mail.gmail.com>
On Sat, Apr 6, 2019 at 5:33 PM Duy Nguyen <pclouds@gmail.com> wrote:
Show 7 quoted lines
> > trace2 API can already take 'struct repository' (the_repository is a > pointer to 'struct repository'). I'm pretty sure the purpose is to > _not_ pass the_repository (because it implies the default repo, which > is not always true). Which means you read-cache.c's functions need to > take 'struct repository *' as an argument and let the caller decide > what repo they want to use.
right, i mistyped.
Show 8 quoted lines
> In some cases, it will be simple. For example, if you have a look at > repo_read_index(), it already knows what repo it handles, so you can > just extend read_index_from() to take 'struct repository *' and pass > 'repo' to it. > > Be careful though, repository and istate does not have one-to-one > relationship (I'll leave it to you to find out why). So you cannot > replace
should i run all the tests after making the changes, or are there some specific ones.