提交 d2d66f15 编写于 作者: J Jeff King 提交者: Junio C Hamano

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: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 ab35469d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册