git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH 0/3] push: add 'prune' option
@ 2012-02-17 19:12 Felipe Contreras
  2012-02-17 19:12 ` [RFC/PATCH 1/3] remote: use a local variable in match_push_refs() Felipe Contreras
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Felipe Contreras @ 2012-02-17 19:12 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jeff King, Felipe Contreras

Hi,

As mentioned in a previous thread[1], git is lacking some functionality to
synchronize completely with remote repositories.

As an example I put my use-case; I want to backup *all* my local branches to a
personal repository, and I want to remove branches that I have removed from my
local repository. git push personal 'refs/heads/*' mostly does the job, but it
doesn't remove anything, and that's where 'prune' comes from.

Do not confuse the remote branches with the upstream ones; you could have two
repositories where you want to synchronize branches to:
% git push --prune --force backup1 'refs/heads/*'
% git push --prune --force backup2 'refs/heads/*'

I still think a 'git remote sync' would be tremendously useful, but it can
actually use this --prune option.

I know, documentation and testing are missing, but perhaps there will be
comments on the code itself.

Cheers.

[1] http://article.gmane.org/gmane.comp.version-control.git/184990

Felipe Contreras (3):
  remote: use a local variable in match_push_refs()
  remote: reorganize check_pattern_match()
  push: add 'prune' option

 builtin/push.c |    2 +
 remote.c       |   91 +++++++++++++++++++++++++++++++++++--------------------
 remote.h       |    3 +-
 transport.c    |    2 +
 transport.h    |    1 +
 5 files changed, 65 insertions(+), 34 deletions(-)

-- 
1.7.9.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-02-22 23:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 19:12 [RFC/PATCH 0/3] push: add 'prune' option Felipe Contreras
2012-02-17 19:12 ` [RFC/PATCH 1/3] remote: use a local variable in match_push_refs() Felipe Contreras
2012-02-17 22:31   ` Junio C Hamano
2012-02-17 19:12 ` [RFC/PATCH 2/3] remote: reorganize check_pattern_match() Felipe Contreras
2012-02-17 22:34   ` Junio C Hamano
2012-02-22 20:15     ` Felipe Contreras
2012-02-22 21:02       ` Junio C Hamano
2012-02-17 19:12 ` [RFC/PATCH 3/3] push: add 'prune' option Felipe Contreras
2012-02-17 22:25   ` Jeff King
2012-02-17 22:34   ` Junio C Hamano
2012-02-22 20:43     ` Felipe Contreras
2012-02-22 20:56       ` Junio C Hamano
2012-02-22 23:06       ` Felipe Contreras
2012-02-22 23:54         ` Junio C Hamano
2012-02-21 15:30 ` [RFC/PATCH 0/3] " Nguyen Thai Ngoc Duy
2012-02-21 17:35   ` Jeff King
2012-02-22  1:45     ` Nguyen Thai Ngoc Duy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).