summaryrefslogtreecommitdiff
path: root/Documentation/git-submodule.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-08-05 22:36:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-05 22:56:54 (GMT)
commit6280dfdc3b22aa821521182781e5a247b19fb515 (patch)
tree558e2c5187a36ad5710eae064d3b6acd99ada98b /Documentation/git-submodule.txt
parentda656f17d37fe96454645c08f21a24134f5aa900 (diff)
downloadgit-6280dfdc3b22aa821521182781e5a247b19fb515.zip
git-6280dfdc3b22aa821521182781e5a247b19fb515.tar.gz
git-6280dfdc3b22aa821521182781e5a247b19fb515.tar.bz2
fast-export: quote paths in output
Many pathnames in a fast-import stream need to be quoted. In particular: 1. Pathnames at the end of an "M" or "D" line need quoting if they contain a LF or start with double-quote. 2. Pathnames on a "C" or "R" line need quoting as above, but also if they contain spaces. For (1), we weren't quoting at all. For (2), we put double-quotes around the paths to handle spaces, but ignored the possibility that they would need further quoting. This patch checks whether each pathname needs c-style quoting, and uses it. This is slightly overkill for (1), which doesn't actually need to quote many characters that vanilla c-style quoting does. However, it shouldn't hurt, as any implementation needs to be ready to handle quoted strings anyway. In addition to adding a test, we have to tweak a test which blindly assumed that case (2) would always use double-quotes, whether it needed to or not. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
0 files changed, 0 insertions, 0 deletions