From: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail•com>
To: git@vger•kernel.org
Cc: gitster@pobox•com, christian.couder@gmail•com,
karthik.188@gmail•com, jltobler@gmail•com,
ayu.chandekar@gmail•com, siddharthasthana31@gmail•com,
lucasseikioshiro@gmail•com,
Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail•com>
Subject: [GSOC][PATCH 0/2] Remove global state from editor.c
Date: Sun, 1 Mar 2026 16:12:57 +0530 [thread overview]
Message-ID: <20260301105228.1738388-1-shreyanshpaliwalcmsmn@gmail.com> (raw)
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'.
Shreyansh Paliwal (2):
editor: make editor_program local to editor.c
editor: remove the_repository usage
builtin/var.c | 2 +-
editor.c | 18 ++++++++++++------
editor.h | 6 ++++--
environment.c | 5 ++---
environment.h | 1 -
rebase-interactive.c | 2 +-
6 files changed, 20 insertions(+), 14 deletions(-)
--
2.53.0
next reply other threads:[~2026-03-01 10:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-01 10:42 Shreyansh Paliwal [this message]
2026-03-01 10:42 ` [GSOC][PATCH 1/2] editor: make editor_program local to editor.c Shreyansh Paliwal
2026-03-01 13:19 ` Burak Kaan Karaçay
2026-03-01 15:42 ` Shreyansh Paliwal
2026-03-01 16:22 ` Phillip Wood
2026-03-01 18:30 ` Burak Kaan Karaçay
2026-03-09 10:36 ` Karthik Nayak
2026-03-01 10:42 ` [GSOC][PATCH 2/2] editor: remove the_repository usage Shreyansh Paliwal
2026-03-09 10:37 ` Karthik Nayak
2026-03-01 16:39 ` [GSOC][PATCH 0/2] Remove global state from editor.c Tian Yuchen
2026-03-10 17:40 ` [GSOC][PATCH v2 " Shreyansh Paliwal
2026-03-10 17:40 ` [GSOC][PATCH v2 1/2] editor: make editor_program local to editor.c Shreyansh Paliwal
2026-03-10 17:40 ` [GSOC][PATCH v2 2/2] editor: remove the_repository usage Shreyansh Paliwal
2026-03-17 16:03 ` [GSOC][PATCH v2 0/2] Remove global state from editor.c Shreyansh Paliwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260301105228.1738388-1-shreyanshpaliwalcmsmn@gmail.com \
--to=shreyanshpaliwalcmsmn@gmail$(echo .)com \
--cc=ayu.chandekar@gmail$(echo .)com \
--cc=christian.couder@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=jltobler@gmail$(echo .)com \
--cc=karthik.188@gmail$(echo .)com \
--cc=lucasseikioshiro@gmail$(echo .)com \
--cc=siddharthasthana31@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox