# Re: \[PATCH v7 07/15\] update-index: move add\_cacheinfo() to read-cache.c

- From: Alban Gruin \<hidden\>
- Date: 2021-03-23 20:45:51 
- List: git
- Page: https://ratatoskr.run/git/2021/03/7881477
- Thread: https://ratatoskr.run/git/2020/06/7851045/t/2.md

```text
Hi Johannes,

Le 22/03/2021 à 22:59, Johannes Schindelin a écrit :
> Hi Alban,
> 
> On Wed, 17 Mar 2021, Alban Gruin wrote:
> 
>> This moves the function add_cacheinfo() that already exists in
>> update-index.c to update-index.c, renames it add_to_index_cacheinfo(),
>> and adds an `istate' parameter.  The new cache entry is returned through
>> a pointer passed in the parameters.  The return value is either 0
>> (success), -1 (invalid path), or -2 (failed to add the file in the
>> index).
> 
> This paragraph still talks about magic numbers, but the code has constants
> for them. Maybe elevate the commit message to a more generic description
> that does not spend time on specifying the exact values, but rather lists
> the three outcomes in plain English?
> 

Okay, I'll do this.

Cheers,
Alban

> Other than that, this looks fine to me! Thanks,
> Dscho
> 

```
