Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS
- From
Stefan Beller <sbeller@google.com>
- Date
- May 2, 2017, 17:06 UTC
- Message-ID
- <CAGZ79kYzDTgtwx6JT4HULTm4sXGLicc_-sMATuL9ayOHxR-4+A@mail.gmail.com>
- In-Reply-To
- <253450f8-4ece-e31b-c139-5d8a3863fb9a@jeffhostetler.com>
On Tue, May 2, 2017 at 8:35 AM, Jeff Hostetler <git@jeffhostetler.com> wrote:
> You may also want to look at unpack-trees.c : mark_new_skip_worktree(). > It has a local variable named "the_index" in the argument list. > You may want to rename this to avoid confusion.
Thanks for bringing this up. I just made a local commit, to be sent out with v2.
Show 5 quoted lines
> > Thank you for bringing this up and making this proposal. > I started a similar effort internally last fall, but > stopped because of the footprint size. >
Yeah, I also have a bad feeling about the foot print, which is why I asked if now is a good time to go with such a series.
Show 11 quoted lines
> In addition to (eventually) allowing multiple repos be open at
> the same time for submodules, it would also help with various
> multi-threading efforts. For example, we have loops that do a
> "for (k = 0, k < active_nr; k++) {...}" There is no visual clue
> in that code that it references "the_index" and therefore should
> be subject to the same locking. Granted, this is a trivial example,
> but goes to the argument that the code has lots of subtle global
> variables and macros that make it difficult to reason about the
> code.
>
> This step would help un-hide this.Thanks for pointing out the actual underlying reason, that I was trying to formulate. I'll borrow these lines for future cover letters.
Thanks, Stefan