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

Re: backup or mirror a repository

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 30, 2007, 00:33 UTC
Message-ID
<Pine.LNX.4.64.0710300030530.4362@racer.site>
In-Reply-To
<20071018053226.GA20588@dpotapov.dyndns.org>
Hi,
On Thu, 18 Oct 2007, Dmitry Potapov wrote:
Show 15 quoted lines
> On Thu, Sep 27, 2007 at 11:27:06PM -0700, Junio C Hamano wrote:
> > The "git remote add --mirror" setup is about setting up the
> > local repository _AS_ the backup of the remote.  In other words,
> > the contents come from the remote by fetching from it and safely
> > kept away from disaster on the local side.  And for that,
> > "remote prune" is a perfect thing to do.
> 
> I have tried to do that but I am getting a warning:
> $ git remote prune origin
> Warning: unrecognized mapping in remotes.origin.fetch: +refs/*:refs/*
> and no branch is removed.
> 
> I suspect that the change that introduced --mirror option for the 'add' 
> command did not adjust the prune procedure to handle the new situation 
> properly. Or is just me doing something wrong?

No, you're right. I did not anticipate git-remote to be written the way it is. After fiddling with it for several hours, I am giving up for now. IMHO the script is too married to the idea that the remote branches live in refs/remotes/<remote>/*. Probably it would be very easy by now to implement it as a builtin, using remote.[ch].

Ciao, Dscho

Previous: Dmitry Potapov
Message 9 of 9 in “backup or mirror a repository”
  1. Dan FarinaSep 27, 2007
  2. Johannes SchindelinSep 27, 2007
  3. Dan FarinaSep 28, 2007
  4. Johannes SchindelinSep 28, 2007
  5. Dan FarinaSep 28, 2007
  6. Junio C HamanoSep 28, 2007
  7. Dan FarinaSep 28, 2007
  8. Dmitry PotapovOct 18, 2007
  9. Johannes SchindelinOct 30, 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.