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

libgit: git_setup_directory() is not reentrant

From
CTChristian Thaeter <ct@pipapo.org>
Date
Jan 4, 2008, 17:07 UTC
Message-ID
<477E67C5.5020301@pipapo.org>

While working on a git-browser, I noticed that git_setup_directory() is not reentrant. Once called it initializes (by calling other functions in turn) several static/hidden variables which can't be altered afterwards. This is ugly when one wants to iterate over different repositories (generating a list of available repos).

How could we fix this? I would propose that subsequent 'git_setup_directory()' calls will reinit the setup completely.

Another way would be to provide a 'git_setup_reset()' function which lets one cleanup all setup things before calling 'git_setup_directory()' again.

Comments?
	Christian
Next: Junio C Hamano
Message 1 of 2 in “libgit: git_setup_directory() is not reentrant”
  1. Christian ThaeterJan 4, 2008
  2. Junio C HamanoJan 4, 2008

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.