Git development
 help / color / mirror / Atom feed
From: Asheesh Laroia <asheesh@asheesh.org>
To: Steven Grimm <koreth@midwinter.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Teach git-svn how to catch up with its tracking branches
Date: Wed, 7 May 2008 23:48:17 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.00.0805072332300.6948@swallowtail> (raw)
In-Reply-To: <20080508013956.GA24956@midwinter.com>

On Wed, 7 May 2008, Steven Grimm wrote:

> In environments where a lot of people are sharing an svn repository using
> git-svn, everyone has identical, but individually maintained, tracking
> branches.

To further muddy the waters, let me talk about my setup, also one with a 
"central git repository" from which all developers clone, and also one 
based on a Subversion tree.

The way I handle it is that, hidden somewhere, I have an account with a 
cron job that does this:

$ git svn fetch
$ git push origin refs/remotes/*:refs/heads/*
$ git push origin refs/remotes/trunk:refs/heads/master

The first push synchronizes "origin" to have the same branches as this 
git-svn copy of the git repository, and the second updates "origin" so 
that it has a "master"; without that second step, "git clone" will error 
out when it get to its checkout phase.

Note that in .git/config, the [remote "origin"] section has no "fetch" 
parameter.  If it did have one, a would end up creating the branch 
origin/master on the second push, and origin/origin/master on the third, 
and so on.

After the push, "origin" ends up being a git repository that looks just 
like the svn repository we're cloning.  When you "git clone" it, the 
remote has all the tags and branches of the upstream svn repository; and 
as the upstream svn repository updates its branches, the git branches get 
those updates.

I'm not saying this patch shouldn't be accepted; I have no comment on it. 
I just want to see what others think of my approach to this workflow.

-- Asheesh.

-- 
What happened last night can happen again.

  parent reply	other threads:[~2008-05-08  6:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08  1:39 [PATCH] Teach git-svn how to catch up with its tracking branches Steven Grimm
2008-05-08  1:55 ` Junio C Hamano
2008-05-08  2:17   ` Steven Grimm
2008-05-08  1:58 ` Chris Shoemaker
2008-05-08  2:08   ` Steven Grimm
2008-05-08  2:25     ` Chris Shoemaker
2008-05-08  7:38       ` Karl Hasselström
2008-05-08  7:43         ` Karl Hasselström
2008-05-08  7:58           ` Steven Grimm
2008-05-08  8:13             ` Karl Hasselström
2008-05-08  4:19 ` [PATCH v2] " Steven Grimm
2008-05-11  8:27   ` Eric Wong
2008-05-08  6:48 ` Asheesh Laroia [this message]
2008-05-08  7:33   ` [PATCH] " Steven Grimm
2008-05-08  7:48   ` Chris Shoemaker
2008-05-08  8:21   ` Chris Shoemaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.00.0805072332300.6948@swallowtail \
    --to=asheesh@asheesh.org \
    --cc=git@vger.kernel.org \
    --cc=koreth@midwinter.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox