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

Re: [RFC PATCH 0/3] pretty, builtin/mailinfo: don't rely on the_repository

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 15, 2024, 19:51 UTC
Message-ID
<Zw7Hy12qHhd5BhGh@nand.local>
In-Reply-To
<20241015144935.4059-1-five231003@gmail.com>
On Tue, Oct 15, 2024 at 08:01:21PM +0530, Kousik Sanagavarapu wrote:
Show 19 quoted lines
> Hi,
> Just a brief summary -
>
> 1/3 - the main changes are in environment.[ch] and repository.[ch], all
>       the others are just changes due to this change.
>
> 2/3 - the main changes are in pretty.[ch], all the other changes are due
>       to this change.
>
> 3/3 - This is pretty straight-forward.
>
> One may notice that there are more "the_repository" occurences now than
> before this change - which is good since it means that we have now made
> the respective dependencies explicit (these were previously implicit).
>
> The change in 1/3 is marked RFC since I was kind of skeptical about the
> "repo" check in the repo_*() functions being done at _that_ level.
> Since every other change in this series depends on this, I've marked all
> the other RFC as well.

I share the concern that others have raised in this thread about not having the_repository when one of the affected commands is ran outside of the repository.

I'll bring these patches into my tree, but let's hold off on queueing them into 'seen' for now.

In the meantime, as a style suggestion, it might be nice to provide a wrapper for function foo() -> repo_foo(), where the former still exists, but is a wrapper for repo_foo(the_repository) like we have done in other similar transitions.

Thanks, Taylor

Previous: shejialuoNext: Kousik Sanagavarapu
Message 12 of 13 in “pretty, builtin/mailinfo: don't rely on the_repository”
  1. 0/3 pretty, builtin/mailinfo: don't rely on the_repositoryKousik Sanagavarapu, Oct 15, 2024
  2. 1/3 repository: move git_*_encoding configs to repo scopeKousik Sanagavarapu, Oct 15, 2024
  3. shejialuoOct 15, 2024
  4. Patrick SteinhardtOct 16, 2024
  5. Kousik SanagavarapuOct 16, 2024
  6. Patrick SteinhardtOct 17, 2024
  7. shejialuoOct 17, 2024
  8. Kousik SanagavarapuOct 16, 2024
  9. 2/3 pretty: don't rely on "the_repository"Kousik Sanagavarapu, Oct 15, 2024
  10. 3/3 builtin/mailinfo: don't rely on "the_repository"Kousik Sanagavarapu, Oct 15, 2024
  11. shejialuoOct 15, 2024
  12. Taylor BlauOct 15, 2024
  13. Kousik SanagavarapuOct 16, 2024

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.