From: karthik nayak Date: Fri, 15 Nov 2024 14:13:11 GMT Subject: Re: [PATCH 0/8] Change midx.c and midx-write.c to not use global variables Message-ID: In-Reply-To: <20241115-374-refactor-midx-c-and-midx-write-c-to-not-depend-on-global-state-v1-0-761f8a2c7775@gmail.com> Karthik Nayak writes: > Similar to the earlier patch series on cleaning up packfile.c and > removing usage of global variables [1], we change the midx.c and > midx-write.c files to no longer use global variables. > > This is done by the following: > - Usage of repository variable already available in existing structs. > - Passing down repository variable from other subsystems. > - Modifying all subcommands to obtain repository variable from the > command in `builtins/` and passing down the variable from there. > > The biggest change is in the first commit, wherein we modify all > subcommands to add the repository variable. Since the subcommand > definition are not often changed, it shouldn't cause too many conflicts > with in flight topics. > > Since the `packfile.c` cleanup is still in flight, this series is based > on top of master: b31fb630c0 (Merge https://github.com/j6t/git-gui, > 2024-11-11) with those patches merged in. There are some topics in `seen` which would conflict with this series. I think the fixes should generally be trivial and I'll try and iron them out in the next version.