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

Re: git-clone --reference problem?

From
Junio C Hamano <junkio@cox.net>
Date
Apr 24, 2006, 08:12 UTC
Message-ID
<7vmzeb8k9l.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0604231122490.3701@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 11 quoted lines
> Maybe something like this could work.
>
> Untested, of course. It probably isn't even syntactically correct shell. 
> Whatever. You get the idea.
>
> (That while-loop could probably be simplified to just a 
>
>   cat ""$reference/objects/info/alternates" >> "$GIT_DIR/objects/info/alternates"
>
> because all alternates _should_ already be absolute paths, but hey, 
> whatever.

I was hoping that the solution would be to do the recursive alternate resolution on the runtime side (IOW, prepare_alt_odb() in sha1_file.c). Then the repository you borrow from _could_ change its own alternates after you set up your repository to borrow from it.

Currently, if the repository you borrowed from suddenly starts borrowing from somewhere else and pruned itself by running "repack -a -d -l", the borrower would be in trouble, even with your patch.

Previous: Linus Torvalds
Message 5 of 5 in “git-clone --reference problem?”
  1. David WoodhouseApr 23, 2006
  2. Junio C HamanoApr 23, 2006
  3. Linus TorvaldsApr 23, 2006
  4. Linus TorvaldsApr 23, 2006
  5. Junio C HamanoApr 24, 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.