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>
This commit is contained in:
parent
ab35469de0
commit
d2d66f15b6
@ -358,7 +358,7 @@ To move the whole tree into a subdirectory, or remove it from there:
|
|||||||
|
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
git filter-branch --index-filter \
|
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_INDEX_FILE=$GIT_INDEX_FILE.new \
|
||||||
git update-index --index-info &&
|
git update-index --index-info &&
|
||||||
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
|
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user