# [PATCH] Fix typo in filter-branch example

4 messages from 2009-08-13 to 2009-08-13. Participants: Ori Avtalion, Michael J Gruber, Johannes Schindelin.
Thread: https://gitlist.dev/t/20582

## Ori Avtalion, 2009-08-13 16:16

Subject: [PATCH] Fix typo in filter-branch example
Message-ID: <4a843cdf.1608c00a.504c.0eed@mx.google.com>
URL: https://gitlist.dev/e/4a843cdf.1608c00a.504c.0eed%40mx.google.com

```
---
 Documentation/git-filter-branch.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index ab527b5..8cda87c 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -336,7 +336,7 @@ 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 ls-files -s | sed "s-\t-\tnewsubdir/-" |
 		GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
 			git update-index --index-info &&
 	 mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
-- 
1.6.4.114.gefd1.dirty

```

## Michael J Gruber, 2009-08-13 16:36

Subject: Re: [PATCH] Fix typo in filter-branch example
Message-ID: <4A844103.6030508@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4A844103.6030508%40drmicha.warpmail.net
In-Reply-To: <4a843cdf.1608c00a.504c.0eed@mx.google.com>

```
Ori Avtalion venit, vidit, dixit 13.08.2009 18:16:
> ---
>  Documentation/git-filter-branch.txt |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
> index ab527b5..8cda87c 100644
> --- a/Documentation/git-filter-branch.txt
> +++ b/Documentation/git-filter-branch.txt
> @@ -336,7 +336,7 @@ 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 ls-files -s | sed "s-\t-\tnewsubdir/-" |
>  		GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
>  			git update-index --index-info &&
>  	 mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD

If \t is matched then isn't & == \t?

Michael

```

## Johannes Schindelin, 2009-08-13 17:04

Subject: Re: [PATCH] Fix typo in filter-branch example
Message-ID: <alpine.DEB.1.00.0908131903280.7429@intel-tinevez-2-302>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0908131903280.7429%40intel-tinevez-2-302
In-Reply-To: <4a843cdf.1608c00a.504c.0eed@mx.google.com>

```
Hi,

On Thu, 13 Aug 2009, Ori Avtalion wrote:

> ---

This is not a typo. '&' is sed's way to specify the matched string.  Where 
does it occur anyway (the commit message makes a fabulous place to put 
such information)?

Ciao,
Dscho

```

## Ori Avtalion, 2009-08-13 17:15

Subject: Re: [PATCH] Fix typo in filter-branch example
Message-ID: <4A844A2A.6080305@avtalion.name>
URL: https://gitlist.dev/e/4A844A2A.6080305%40avtalion.name
In-Reply-To: <alpine.DEB.1.00.0908131903280.7429@intel-tinevez-2-302>

```
On 08/13/2009 08:04 PM, Johannes Schindelin wrote:
>
> This is not a typo. '&' is sed's way to specify the matched string.  Where
> does it occur anyway (the commit message makes a fabulous place to put
> such information)?

Whoops! My mistake!

I think I accidentally removed it when I tried the example, and then 
added it in a wrong position when that didn't work :)

Sorry for the false alarm!

```
