1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-08 14:46:11 +02:00

docs: fix filter-branch subdir example for exotic repo names

The GIT_INDEX_FILE variable we get from git has the full
path to the repo, which may contain spaces. When we use it
in our shell snippet, it needs to be quoted.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2011-04-01 10:46:27 -04:00 committed by Junio C Hamano
parent 2352570bf4
commit 6cb0186a41

View File

@ -361,7 +361,7 @@ git filter-branch --index-filter \
'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
mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' HEAD
---------------------------------------------------------------