All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Mercer <ramercer@gmail.com>
To: git@vger.kernel.org
Subject: Re: Using filter-branch to move repo contents in subdirectory
Date: Mon, 9 Aug 2010 14:36:19 -0500	[thread overview]
Message-ID: <AANLkTi=TeJvF+swpMWddDtA7jh4XWedQ+FjigEdRYkx_@mail.gmail.com> (raw)
In-Reply-To: <AANLkTik2dL5jrEjZe0LB6Y4_PEwRt-7t_5CG7gup3pnV@mail.gmail.com>

On Thu, Jul 29, 2010 at 07:37, Adam Mercer <ramercer@gmail.com> wrote:

> I'm trying to use git filter-branch to move all contents of a repo
> into a subdirectory of the repo root. The git filter-branch man page
> has the following example:
>
>       To move the whole tree into a subdirectory, or remove it from there:
>
>           git filter-branch --index-filter \
>                   'git ls-files -s | sed "s-\t\"*-&newsubdir/-" |
>                           GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
>                                   git update-index --index-info &&
>                    mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD

I'm trying to do this with another repo now and am getting a different
error message:

$ git filter-branch --index-filter \
    'git ls-files -s | gsed "s-\t\"*-&sftlib/-" |
        GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
            git update-index --index-info &&
    mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
Rewrite b3100fb24a7eb2f349801f3b87cf995dc3d14bba (1/44)mv:
/Users/ram/git/eah2/.git-rewrite/t/../index.new: No such file or
directory
index filter failed: git ls-files -s | gsed "s-\t\"*-&sftlib/-" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && mv
$GIT_INDEX_FILE.new $GIT_INDEX_FILE
$

Any ideas?

This is on Mac OS X 10.6.4, with git-1.7.2.1, and GNU sed 4.2.1

Cheers

Adam

  parent reply	other threads:[~2010-08-09 19:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29 12:37 Using filter-branch to move repo contents in subdirectory Adam Mercer
2010-07-29 13:08 ` Thomas Rast
2010-07-29 13:15   ` Adam Mercer
2010-07-29 13:24     ` [PATCH] filter-branch tests/docs: avoid \t in sed regexes Thomas Rast
2010-07-29 14:47       ` Tomas Carnecky
2010-07-29 14:52         ` Thomas Rast
2010-07-29 15:02           ` Tomas Carnecky
2010-07-29 15:10             ` [PATCH] t7005: fix subdirectory-filter test Thomas Rast
2010-07-29 15:12               ` Thomas Rast
2010-08-09 19:36 ` Adam Mercer [this message]
2010-08-11 15:01   ` Using filter-branch to move repo contents in subdirectory Adam Mercer
2010-08-11 19:32     ` Jeff King
2010-08-11 19:59       ` Adam Mercer

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='AANLkTi=TeJvF+swpMWddDtA7jh4XWedQ+FjigEdRYkx_@mail.gmail.com' \
    --to=ramercer@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.