From: Jonathan Nieder <jrnieder@gmail.com>
To: Stefan Zager <szager@google.com>
Cc: git@vger.kernel.org
Subject: Re: static variables
Date: Tue, 10 Dec 2013 17:53:14 -0800 [thread overview]
Message-ID: <20131211015314.GJ2311@google.com> (raw)
In-Reply-To: <20131211014501.GI2311@google.com>
Jonathan Nieder wrote:
> Stefan Zager wrote:
>> 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.
prev parent reply other threads:[~2013-12-11 1:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 1:25 static variables Stefan Zager
2013-12-11 1:45 ` Jonathan Nieder
2013-12-11 1:53 ` Jonathan Nieder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131211015314.GJ2311@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=szager@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).