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

Re: [PATCH] Dissociating a repository from its alternates

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 22, 2007, 19:05 UTC
Message-ID
<Pine.LNX.4.64.0710221957360.25221@racer.site>
In-Reply-To
<20071022180424.GA17429@ginosko.local>
Hi,
On Mon, 22 Oct 2007, Michael Hendricks wrote:
Show 16 quoted lines
> On Fri, Feb 16, 2007 at 12:13:01PM -0800, Junio C Hamano wrote:
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > 
> > > On Wed, 14 Feb 2007, Junio C Hamano wrote:
> > >
> > >> People often start out with "clone -l -s" (or --reference) and
> > >> later wish to dissociate the repository from its alternates.
> > >
> > > Why not make a really dumb script which just _copies_ (or maybe 
> > > optionally hard link) the objects from the alternate repo, and then kills 
> > > the alternatives file? That should be easier. You always can repack after 
> > > that.
> > 
> > I think that is much safer.
> 
> Was such a script ever incorporated into Git?

Not that I know of, but "git repack -a && rm .git/objects/info/alternates" should do what you want. You can even make a script of it, add some documentation and a test case, and earn git fame by posting a patch ;-)

Ciao, Dscho

Previous: Michael HendricksNext: Michael Hendricks
Message 6 of 9 in “Dissociating a repository from its alternates”
  1. Dissociating a repository from its alternatesJunio C Hamano, Feb 15, 2007
  2. Dissociating a repository from its alternatesJunio C Hamano, Feb 15, 2007
  3. Johannes SchindelinFeb 15, 2007
  4. Junio C HamanoFeb 16, 2007
  5. Michael HendricksOct 22, 2007
  6. Johannes SchindelinOct 22, 2007
  7. Michael HendricksOct 22, 2007
  8. Johannes SchindelinOct 23, 2007
  9. James CloosFeb 16, 2007

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.