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

Re: Alternates and push

From
Petr Baudis <pasky@suse.cz>
Date
Sep 9, 2008, 08:35 UTC
Message-ID
<20080909083551.GA10544@machine.or.cz>
In-Reply-To
<20080906192106.GB18631@spearce.org>
On Sat, Sep 06, 2008 at 12:21:06PM -0700, Shawn O. Pearce wrote:
Show 15 quoted lines
> github should do what repo.or.cz does:
> 
> 	ln -s .../linus.git/refs digispeaker.git/refs/forkee
> 
> That way the refs available in Linus' tree are also available
> in your tree as Git will transparently follow the symlink.
> 
> However you have to be careful to make sure `git pack-refs` isn't
> run with `--all --prune` as it will delete the refs from linus.git
> when executed in digispeaker.git.  Fun times when I did that to my
> own repository one day.  ;-)
> 
> Though we probably should fix Git to be somewhat smarter.  But
> until that stable binary is available, the symlink trick above
> is a good work around.

But it should be used only in controlled environment. If you happen to have permissions to write to the forkee, you can wipe out its refs with git fetch --mirror (and if you don't happen to have permissions, it will just fail, so currently you cannot use this on repo.or.cz forks, unfortunately). If you don't make sure refs are never packed (I do on repo.or.cz, historically because of dumb transports - do they support packed refs by now?), this won't work either. Maybe there are other considerations too.

-- 
				Petr "Pasky" Baudis
The next generation of interesting software will be done
on the Macintosh, not the IBM PC.  -- Bill Gates
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 6 of 20 in “Alternates and push”
  1. Jon SmirlSep 6, 2008
  2. Theodore TsoSep 6, 2008
  3. Junio C HamanoSep 6, 2008
  4. Jon SmirlSep 6, 2008
  5. Shawn O. PearceSep 6, 2008
  6. Petr BaudisSep 9, 2008
  7. Shawn O. PearceSep 9, 2008
  8. Jan HudecSep 7, 2008
  9. Junio C HamanoSep 7, 2008
  10. Jan HudecSep 7, 2008
  11. Junio C HamanoSep 7, 2008
  12. Jan HudecSep 8, 2008
  13. Theodore TsoSep 7, 2008
  14. Junio C HamanoSep 8, 2008
  15. Theodore TsoSep 8, 2008
  16. Junio C HamanoSep 8, 2008
  17. Junio C HamanoSep 8, 2008
  18. Junio C HamanoSep 8, 2008
  19. Daniel BarkalowSep 8, 2008
  20. Shawn O. PearceSep 8, 2008

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.