git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSOC][PATCH 2/2] editor: remove the_repository usage

From
Karthik Nayak <karthik.188@gmail.com>
Date
Mar 9, 2026, 10:37 UTC
Message-ID
<CAOLa=ZQaLRBxjbD9yPJd3ksvAgnpyuCAKM=Y5YXvwVgw-0AzmQ@mail.gmail.com>
In-Reply-To
<20260301105228.1738388-3-shreyanshpaliwalcmsmn@gmail.com>
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.
Previous: Shreyansh PaliwalNext: Tian Yuchen
Message 9 of 14 in “Remove global state from editor.c”
  1. Shreyansh PaliwalMar 1, 2026
  2. [GSOC][PATCH 1/2] editor: make editor_program local to editor.cShreyansh Paliwal, Mar 1, 2026
  3. Burak Kaan KaraçayMar 1, 2026
  4. Shreyansh PaliwalMar 1, 2026
  5. Phillip WoodMar 1, 2026
  6. Burak Kaan KaraçayMar 1, 2026
  7. Karthik NayakMar 9, 2026
  8. [GSOC][PATCH 2/2] editor: remove the_repository usageShreyansh Paliwal, Mar 1, 2026
  9. Karthik NayakMar 9, 2026
  10. Tian YuchenMar 1, 2026
  11. [GSOC][PATCH v2 0/2] Remove global state from editor.cShreyansh Paliwal, Mar 10, 2026
  12. [GSOC][PATCH v2 1/2] editor: make editor_program local to editor.cShreyansh Paliwal, Mar 10, 2026
  13. [GSOC][PATCH v2 2/2] editor: remove the_repository usageShreyansh Paliwal, Mar 10, 2026
  14. Shreyansh PaliwalMar 17, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.