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

Re: [PATCH 4/6] Make it possible to set up libgit directly (instead of from the environment)

From
Petr Baudis <pasky@suse.cz>
Date
Jul 3, 2006, 21:30 UTC
Message-ID
<20060703213059.GO29115@pasky.or.cz>
In-Reply-To
<20060703204803.28541.67315.stgit@machine.or.cz>

Dear diary, on Mon, Jul 03, 2006 at 10:48:03PM CEST, I got a letter where Petr Baudis <pasky@suse.cz> said that...

Show 11 quoted lines
> This introduces a setup_git() function which is essentialy a (public)
> backend for setup_git_env() which lets anyone specify custom sources
> for the various paths instead of environment variables. Since the repositories
> may get switched on the fly, this also updates code that caches paths to
> invalidate them properly; I hope neither of those is a sweet spot.
> 
> It is used by Git.xs' xs__call_gate() to set up per-repository data
> for libgit's consumption. No code actually takes advantage of it yet
> but get_object() will in the next patches.
> 
> Signed-off-by: Petr Baudis <pasky@suse.cz>

To further clarify, this only invalidates the path cache and grafts list, not alternates (it assumes the environment variable stays the same for now; that is to be fixed when we extend Git.pm further) and not pack list - we will automagically extend the list of packs when we meet more repositories, but we will never remove old packs from the list. (For no special reason other than this does no harm other than possibly finding objects that should be missing, and the patch smells bad enough enough as it is now. ;-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Snow falling on Perl. White noise covering line noise.
Hides all the bugs too. -- J. Putnam
Previous: Petr BaudisNext: Petr Baudis
Message 6 of 9 in “The residual Git.pm patches”
  1. 0/6 The residual Git.pm patchesPetr Baudis, Jul 3, 2006
  2. 1/6 Git.pm: Add config() methodPetr Baudis, Jul 3, 2006
  3. 2/6 Convert git-send-email to use Git.pmPetr Baudis, Jul 3, 2006
  4. 3/6 Git.pm: Introduce ident() and ident_person() methodsPetr Baudis, Jul 3, 2006
  5. 4/6 Make it possible to set up libgit directly (instead of from the environment)Petr Baudis, Jul 3, 2006
  6. Petr BaudisJul 3, 2006
  7. Eliminate Scalar::Util for something simplerPetr Baudis, Jul 3, 2006
  8. 5/6 Git.pm: Introduce fast get_object() methodPetr Baudis, Jul 3, 2006
  9. 6/6 Convert git-annotate to use Git.pmPetr Baudis, Jul 3, 2006

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.