threads / patch / 20582

patchFix typo in filter-branch example

Subject: [PATCH] Fix typo in filter-branch example

## tl;dr

4 messages between Aug 13, 2009 and Aug 13, 2009. Diffs are folded; open one to read it.

replies: 3people: 3as markdown or json

Ori Avtalion· Aug 13, 2009, 16:16 UTC · lore
---
 Documentation/git-filter-branch.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to Documentation/git-filter-branch.txt +1 −1
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· Aug 13, 2009, 16:36 UTC · re: Ori Avtalion · lore

Re: [PATCH] Fix typo in filter-branch example

Ori Avtalion venit, vidit, dixit 13.08.2009 18:16:
Show 17 quoted lines
> ---
>  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· Aug 13, 2009, 17:04 UTC · re: Ori Avtalion · lore

Re: [PATCH] Fix typo in filter-branch example

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· Aug 13, 2009, 17:15 UTC · re: Johannes Schindelin · lore

Re: [PATCH] Fix typo in filter-branch example

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!

← back to recent threads