login
Header Space

 
 

Re: backup or mirror a repository

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dan Farina <drfarina@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, <git@...>
Date: Friday, September 28, 2007 - 2:27 am

Dan Farina <drfarina@gmail.com> writes:


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 think what you are asking for is an opposite, a backup remote
site you would push into.  That is not what "remote add --mirror"
is about.

You can almost do it with

	git push --all $remote

except there is no way to automagically remove the branch you
removed from the local repository.  For that, we would need a
new --mirror option to "git-push".

I think it is trivial to do for native transports, as we first
get the list of all refs from the remote side before starting
the transfer.  You need to change the last parameter called
'all' to remote.c::match_refs() into an enum ('push_all' being
one of choices), introduce another enum 'push_mirror', and teach
it to "match" the remote (i.e. dst) ref that does not have
corresponding entry on our side (i.e. src) with an empty object
name to mark it removed.  Then the part marked as "Finally, tell
the other end!"  in send-pack.c::send_pack() will take care of
the actual removal.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
backup or mirror a repository, Dan Farina, (Thu Sep 27, 3:35 pm)
Re: backup or mirror a repository, Johannes Schindelin, (Thu Sep 27, 5:56 pm)
Re: backup or mirror a repository, Dan Farina, (Thu Sep 27, 8:51 pm)
Re: backup or mirror a repository, Johannes Schindelin, (Thu Sep 27, 9:56 pm)
Re: backup or mirror a repository, Dan Farina, (Thu Sep 27, 10:37 pm)
Re: backup or mirror a repository, Junio C Hamano, (Fri Sep 28, 2:27 am)
Re: backup or mirror a repository, Dmitry Potapov, (Thu Oct 18, 1:32 am)
Re: backup or mirror a repository, Johannes Schindelin, (Mon Oct 29, 8:33 pm)
Re: backup or mirror a repository, Dan Farina, (Fri Sep 28, 3:20 am)
speck-geostationary