Subject: Re: Problem using git-filter-branch to move tree when repository name contains space

From: Jean-François Burdet <[email-masked]>
Date: Fri, 01 Apr 2011 23:49:04 +0200

What you suggested solved my problem. What a fast answer ! 6minutes !
Thanks,

JF.

On 01.04.2011 16:41, Jeff King wrote:
> The problem is that GIT_INDEX_FILE is an absolute path that contains the
> repo name. So it needs to be quoted in the mv command. This should work:
> 
>   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
> 
> -Peff
> 
>