git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jon Seymour <jon.seymour@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: Stopping git-svn pulling a particular branch
Date: Fri, 28 Sep 2012 21:03:26 +1000	[thread overview]
Message-ID: <CAH3AnroU4gpf38qTAz87=jbcXCg3Zq_bDk=3BozGgyOGz5HREg@mail.gmail.com> (raw)
In-Reply-To: <CAH3Anro6EOq0Qh6R6-YXpMW+9h0xtZcBR3KY0kRgWT-4mGf1xg@mail.gmail.com>

On Fri, Sep 28, 2012 at 2:58 PM, Jon Seymour <jon.seymour@gmail.com> wrote:
> G'day
>
> An svn developer created a branch from a subdirectory of the trunk
> rather than by copying trunk itself.
>
> I want to avoid pulling this branch into my git repo with git svn
> fetch because the re-rooting pulls in too much history and content
> that I don't want.
>
> Is there any easy way to achieve this? I tried used the --ignore-paths
> option, but this doesn't seem suited to the purpose.
>
> I can delete the SVN branch if that will help, but past experience
> suggests that it won't.
>

Answering my own question. There is an undocumented option to git-svn
--ignore-refs which can be used to achieve this.

I found that I had to manually delete the directories corresponding to
the bogus branches from .git/svn/refs/remotes, then re-run git svn
fetch with the --ignore-refs option set to a regex that matched the
bogus branches.

This allowed me to fetch everything else I needed to fetch and
advanced the maxRevs metadata in .git/svn/.metadata past the
problematic  branches so that subsequent svn fetch calls avoided the
attempts to fetch the bogus branches.

I'll draft a documentation patch when I get a chance...

jon.

      reply	other threads:[~2012-09-28 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  4:58 Stopping git-svn pulling a particular branch Jon Seymour
2012-09-28 11:03 ` Jon Seymour [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAH3AnroU4gpf38qTAz87=jbcXCg3Zq_bDk=3BozGgyOGz5HREg@mail.gmail.com' \
    --to=jon.seymour@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).