@matheusbsbs / matheus-bagliano / commits / d2d66f15b6
Fork 0

docs: fix filter-branch example for quoted paths

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>

Jeff King committed Feb 1, 2010 at 07:43 UTC d2d66f15b620c8e96219cfe339f32e77bfaf69b4
1 file changed +1 -1
Documentation/git-filter-branch.txt
+1 -1
@@ -358,7 +358,7 @@ To move the whole tree into a subdirectory, or remove it from there:
358
359 ---------------------------------------------------------------
360 git filter-branch --index-filter \
361 - 'git ls-files -s | sed "s-\t-&newsubdir/-" |
361 + 'git ls-files -s | sed "s-\t\"*-&newsubdir/-" |
362 GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
363 git update-index --index-info &&
364 mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD