Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: [PATCH] [PATCH] git-mirror - exactly mirror another repository

From: A Large Angry SCM <hidden>
Date: 2016-06-15 22:43:07

Petr Baudis wrote:
Sometimes its handy to be able to efficiently backup or mirror one
Git repository to another Git repository by employing the native
Git object transfer protocol.  But when mirroring or backing up a
repository you really want:

  1) Every object in the source to go to the mirror.
  2) Every ref in the source to go to the mirror.
  3) Any ref removed from the source to be removed from the mirror.

and since git-fetch doesn't do 2 and 3, here's a tool that does.

This is based on Shawn Pearce's patch from 25 Sep 2006, updated to take
Junio's and Sergey's review into account, to use few newer pieces of Git
infrastructure and with few trivial tweaks. The repacking part was dropped
since git-fetch does that on its own now.

I actually still would kind of prefer this to be a git-fetch's feature but
the general mood seems to be to have this as a separate command and I can't
say I care at all.
It would be nice if this had an option to not mirror HEAD and another 
option to map the refs from (/ref/[^/])/(.*) to /ref/\1/${repo_path}/\2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help