Re: [GSOC] [PROPOSAL v2]: Refactoring in order to reduce Git’s global state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> So the approach you suggest is to comb through the global variables and
> config and find new locations for them to be stored. While this is
> definitely a bunch chunk of the problem, shouldn't we also talk about
> how we can reduce usage of some of these variables?
>
> In particular, I'm wondering how you'd want to tackle 'the_repository'
> usage. There is some previous work done here, where Patrick added the
> '#define USE_THE_REPOSITORY_VARIABLE' definition which tracks usage of
> global variable and usage of them in different files.
>
> A possible approach which has been followed is to simply go from the
> bottom layers of the code upwards, cleaning up usage of global variables
> and ensuring we can remove '#define USE_THE_REPOSITORY_VARIABLE' from
> files. This is also the approach taken in some of the patches that
> you've linked.
>

Your approach makes a lot of sense to me, that is, picking a specific
subsystem or file and aiming to remove the `#define USE_THE_REPOSITORY_VARIABLE`
definition and thus 'the_repository' eventually. This was the method
used by Patrick to tackle
the object subsystem in [1]  and the path subsystem in [2] and you to
tackle the packfile in [3].
This approach also helps in removing some of the global variables used
within that particular
subsystem, which is a nice bonus.

However, this approach might not be feasible for the global variables that
arent tightly tied to a single subsystem. So what I can do is, for removing
`the_repository`, I can follow the approach you mentioned, and for relocating
the more general global variables, I can use the approach which I
talked about in the
proposal.

What do you think?

[1]: https://public-inbox.org/git/20250303-b4-pks-objects-without-the-repository-v1-0-c5dd43f2476e@xxxxxx/
[2]: https://public-inbox.org/git/20250206-b4-pks-path-drop-the-repository-v1-0-4e77f0313206@xxxxxx/
[3]: https://public-inbox.org/git/cover.1733236936.git.karthik.188@xxxxxxxxx/




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux