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

Re: [PATCH 6/6] Use the right 'struct repository' instead of the_repository

From
Duy Nguyen <pclouds@gmail.com>
Date
Jun 24, 2019, 14:45 UTC
Message-ID
<CACsJy8A7JT404tMFLs4-qS=S7Sj_dS4NGtXFd0q7xDq0senF_Q@mail.gmail.com>
In-Reply-To
<166543de-bc25-ca2c-326a-4497688aa235@gmail.com>
On Mon, Jun 24, 2019 at 9:24 PM Derrick Stolee <stolee@gmail.com> wrote:
Show 8 quoted lines
>
> On 6/24/2019 5:55 AM, Nguyễn Thái Ngọc Duy wrote:
> > There are a couple of places where 'struct repository' is already passed
> > around, but the_repository is still used. Use the right repo.
> >
> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
>
> nit: the subject line doesn't use the standard "area: topic" format

because there's no specific area to this patch. I don't think sticking to a fixed convention for the sake of it is really sensible.

Show 6 quoted lines
> (including
> the capitalization of the first word). Perhaps:
>
> treewide: use the right 'struct repository' instead of the_repository
>
> The changes here are straight-forward, but how do we check if we are done?

At this point, you can't. At some point we should be able to optionally disable the_repository, at least per file [2]. But even then some function calls inside could still hide the_repository and you would need something like [1] to reveal them.

The problem with [2] is it will cause a lot of problems when adding new code until most of the code is converted. I will bring that up when the number of the_repository (outside builtin/) goes down below ~50. With all my patches, I think we're at 300.

[1] https://gitlab.com/pclouds/git/commit/902a4dbdef6829ca06e12dbf74b0690456733351 [2] https://gitlab.com/pclouds/git/commit/f03f915294210baf038ee72d76ee998d9387028b

-- 
Duy
Previous: Derrick StoleeNext: Johannes Schindelin
Message 16 of 31 in “Kill the_repository in tree-walk.c”
  1. 0/6 Kill the_repository in tree-walk.cNguyễn Thái Ngọc Duy, Jun 24, 2019
  2. 1/6 sha1-file.c: remove the_repo from read_object_with_reference()Nguyễn Thái Ngọc Duy, Jun 24, 2019
  3. Johannes SchindelinJun 27, 2019
  4. Duy NguyenJun 27, 2019
  5. 2/6 tree-walk.c: remove the_repo from fill_tree_descriptor()Nguyễn Thái Ngọc Duy, Jun 24, 2019
  6. Derrick StoleeJun 24, 2019
  7. Junio C HamanoJun 26, 2019
  8. Derrick StoleeJun 26, 2019
  9. 3/6 tree-walk.c: remove the_repo from get_tree_entry()Nguyễn Thái Ngọc Duy, Jun 24, 2019
  10. Derrick StoleeJun 24, 2019
  11. Duy NguyenJun 24, 2019
  12. 4/6 tree-walk.c: remove the_repo from get_tree_entry_follow_symlinks()Nguyễn Thái Ngọc Duy, Jun 24, 2019
  13. 5/6 match-trees.c: remove the_repo from shift_tree*()Nguyễn Thái Ngọc Duy, Jun 24, 2019
  14. 6/6 Use the right 'struct repository' instead of the_repositoryNguyễn Thái Ngọc Duy, Jun 24, 2019
  15. Derrick StoleeJun 24, 2019
  16. Duy NguyenJun 24, 2019
  17. Johannes SchindelinJun 27, 2019
  18. Junio C HamanoJun 26, 2019
  19. Johannes SchindelinJun 27, 2019
  20. Derrick StoleeJun 27, 2019
  21. 0/6 Kill the_repository in tree-walk.cNguyễn Thái Ngọc Duy, Jun 27, 2019
  22. 1/6 sha1-file.c: remove the_repo from read_object_with_reference()Nguyễn Thái Ngọc Duy, Jun 27, 2019
  23. Johannes SchindelinJun 28, 2019
  24. 2/6 tree-walk.c: remove the_repo from fill_tree_descriptor()Nguyễn Thái Ngọc Duy, Jun 27, 2019
  25. 3/6 tree-walk.c: remove the_repo from get_tree_entry()Nguyễn Thái Ngọc Duy, Jun 27, 2019
  26. 4/6 tree-walk.c: remove the_repo from get_tree_entry_follow_symlinks()Nguyễn Thái Ngọc Duy, Jun 27, 2019
  27. 5/6 match-trees.c: remove the_repo from shift_tree*()Nguyễn Thái Ngọc Duy, Jun 27, 2019
  28. 6/6 Use the right 'struct repository' instead of the_repositoryNguyễn Thái Ngọc Duy, Jun 27, 2019
  29. Junio C HamanoJun 27, 2019
  30. 7/6 t7814: do not generate same commits in different reposNguyễn Thái Ngọc Duy, Jun 28, 2019
  31. Junio C HamanoJun 28, 2019

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.