Re: [RFC] TODO in read-cache.c

2019-04-08 Thread Taylor Blau
Hi Kapil, Welcome to Git! I am thrilled to see new faces on the mailing list. On Sat, Apr 06, 2019 at 05:43:56PM +0530, Kapil Jain wrote: > On Sat, Apr 6, 2019 at 5:33 PM Duy Nguyen wrote: > > > > trace2 API can already take 'struct repository' (the_repository is a > > pointer to 'struct reposit

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 8:30 PM Kapil Jain wrote: > > On Sat, Apr 6, 2019 at 5:49 PM Duy Nguyen wrote: > > > > On Sat, Apr 6, 2019 at 7:14 PM Kapil Jain wrote: > > > > In some cases, it will be simple. For example, if you have a look at > > > > repo_read_index(), it already knows what repo it han

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Kapil Jain
On Sat, Apr 6, 2019 at 5:49 PM Duy Nguyen wrote: > > On Sat, Apr 6, 2019 at 7:14 PM Kapil Jain wrote: > > > 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 '

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 7:14 PM Kapil Jain wrote: > > 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 c

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Kapil Jain
On Sat, Apr 6, 2019 at 5:33 PM Duy Nguyen wrote: > > 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

Re: [RFC] TODO in read-cache.c

2019-04-06 Thread Duy Nguyen
On Sat, Apr 6, 2019 at 6:42 PM Kapil Jain wrote: > > i found some TODO tasks inside `read-cache.c` in `read_index_from()` > function. which says: > > /* > * TODO trace2: replace "the_repository" with the actual repo instance > that is associated with the given "istate". > */ > > this same TODO occ

[RFC] TODO in read-cache.c

2019-04-06 Thread Kapil Jain
i found some TODO tasks inside `read-cache.c` in `read_index_from()` function. which says: /* * TODO trace2: replace "the_repository" with the actual repo instance that is associated with the given "istate". */ this same TODO occurs at 4 other places in the same file. Will it be ok, if i complet