"Derrick Stolee via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > From: Derrick Stolee <derrickstolee@xxxxxxxxxx> > > Several builtins depend on being able to disable the replace references > so we actually operate on each object individually. These currently do > so by directly mutating the 'read_replace_refs' global. > > A future change will move this global into a different place, so it will > be necessary to change all of these lines. However, we can simplify that > transition by abstracting the purpose of these global assignments with a > method call. > > We will never scope this to an in-memory repository as we want to make > sure that we never use replace refs throughout the life of the process > if this method is called. > > Signed-off-by: Derrick Stolee <derrickstolee@xxxxxxxxxx> > --- It will naturally be outside the scope of the series, but this change will allow us to add a sanity check to make sure that nobody has read objects that would have been affected by these replace refs before the disable call was made, which is another reason to welcome this change.