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>
Jeff King committed
Apr 1, 2011 at 10:46 UTC
6cb0186a41335f5e82d1e91abf4ce70938d0a020
1 file changed
+1
-1
Documentation/git-filter-branch.txt
+1
-1
@@ -361,7 +361,7 @@ git filter-branch --index-filter \
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
364
+ mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' HEAD
365
---------------------------------------------------------------
366
367