All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Thaeter <ct@pipapo.org>
To: git@vger.kernel.org
Subject: libgit: git_setup_directory() is not reentrant
Date: Fri, 04 Jan 2008 18:07:17 +0100	[thread overview]
Message-ID: <477E67C5.5020301@pipapo.org> (raw)

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

             reply	other threads:[~2008-01-04 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-04 17:07 Christian Thaeter [this message]
2008-01-04 20:40 ` libgit: git_setup_directory() is not reentrant Junio C Hamano

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=477E67C5.5020301@pipapo.org \
    --to=ct@pipapo.org \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.