Skip to content

Commit

Permalink
docs: fix filter-branch example for quoted paths
Browse files Browse the repository at this point in the history
If there is a quoted path, update-index will correctly
unquote it. However, we must take care to put our new prefix
inside the double-quote.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Feb 6, 2010
1 parent ab35469 commit d2d66f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/git-filter-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,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\"*-&newsubdir/-" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
Expand Down

0 comments on commit d2d66f1

Please sign in to comment.