Re: [PATCH v3 00/33] nd/sha1-name-c-wo-the-repository updates
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 11, 2019, 00:26 UTC
- Message-ID
- <CACsJy8AE1cOYCNDu7suQDJ0NYxeoG3w6e-+mZ-J1D5j_WNLWeg@mail.gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1904102254500.41@tvgsbejvaqbjf.bet>
On Thu, Apr 11, 2019 at 3:56 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 15 quoted lines
> > @@ > > + expression c; > > ++expression r; > > + expression s; > > + @@ > > +-- get_commit_tree(c) = s > > ++- repo_get_commit_tree(r, c) = s > > + + c->maybe_tree = s > > I think this is wrong, and admittedly I had the very same version > originally. > > When you have an arbitrary `r` in any `repo_get_commit_tree(r, c)` (as > opposed to `the_repository`), the conversion to `c->maybe_tree` is most > likely incorrect.
I did read the get_commit_tree() source code before doing this. struct repository is only used to get commit graph to speed things up and we can't change a thing there when maybe_tree is reassigned. To reassign maybe_tree, commit-graph does not matter. Neither does the_repository (vs arbitrary struct repo)
Show 5 quoted lines
> > Therefore, I don't think that we can do that. > > Ciao, > Johannes
-- Duy