Re: [GSOC][PATCH 2/2] editor: remove the_repository usage
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> writes:
Show 16 quoted lines
> git_sequence_editor() reads sequence.editor using the_repository. Pass
> struct repository through the callers instead of relying on the global
> state. It is called from,
>
> * builtin/var.c: Mostly the_repository is used in all the functions and
> there is no proper local access to a repository, so pass the_repository.
>
> * editor.c: The caller is inside launch_sequence_editor() function which is
> called from rebase-interactive.c:edit_todo_list(), which does have a
> local repository instance, so pass it down the caller.
>
> With no remaining global states in editor.c remove '#define
> USE_THE_REPOSITORY_VARIABLE'. This removes another dependency on
> the_repository and keeps editor code consistent with the ongoing effort to
> reduce global state.
>
Well explained, the patch looks good to me.