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

Re: static variables

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 11, 2013, 01:53 UTC
Message-ID
<20131211015314.GJ2311@google.com>
In-Reply-To
<20131211014501.GI2311@google.com>
Jonathan Nieder wrote:
> Stefan Zager wrote:
Show 5 quoted lines
>> This is probably a naive question, but: there are quite a lot of static
>> variables in the git code where it's really unnecessary.  Is that just a
>> historical artifact, or is there some reason to prefer them?
>
> Sometimes it's for convenience.
See for example path.c::git_path and mkpath.

Threaded code uses a specialized thread-safe dialect of the usual C used in git. I wish I had better news to offer.

Previous: Jonathan Nieder
Message 3 of 3 in “static variables”
  1. Stefan ZagerDec 11, 2013
  2. Jonathan NiederDec 11, 2013
  3. Jonathan NiederDec 11, 2013

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.