Re: [GSOC][PATCH v2 0/2] Remove global state from editor.c
- From
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
- Date
- Mar 17, 2026, 16:03 UTC
- Message-ID
- <20260317160539.621560-1-shreyanshpaliwalcmsmn@gmail.com>
- In-Reply-To
- <20260310174519.676851-1-shreyanshpaliwalcmsmn@gmail.com>
Show 34 quoted lines
> This series reduces reliance on global states. Mainly there > are two such global states in editor.c, > > * editor_program: defined in environment.c and populated during config > parsing, but only used by editor.c via git_editor(). > > * the_repository: used in git_sequence_editor() to read the sequence.editor > configuration. > > In patch 1/2, localize editor_program to editor.c by introducing a helper > that allows git_default_core_config() to continue initializing the value > during initial config parsing. > > In patch 2/2, remove the remaining use of the_repository in editor.c by > passing struct repository through git_sequence_editor() and its > callers. With this change, editor.c no longer requires > 'USE_THE_REPOSITORY_VARIABLE' and 'environment.h' include. > > Shreyansh Paliwal (2): > editor: make editor_program local to editor.c > editor: remove the_repository usage > > builtin/var.c | 2 +- > editor.c | 19 ++++++++++++------- > editor.h | 6 ++++-- > environment.c | 5 ++--- > environment.h | 1 - > rebase-interactive.c | 2 +- > 6 files changed, 20 insertions(+), 15 deletions(-) > > --- > Changes in v2: > - removed 'environment.h' dependency from editor.c as well. >
Hi,
Sorry for the late follow-up, I was tied up with my college exams. I just wanted to check if there is any specific feedback or concern that is holding this series back. Do let me know :)
Best, Shreyansh