[ https://jira.codehaus.org/browse/SCM-772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Peskin updated SCM-772: ---------------------------- Attachment: maven-scm.patch I've attached a proposed patch file. In getting further into this issue, I decided against using the "{{-z}}" option because it does not have each file on a separate line and switching to using it would cause too big of a change in the flow that drives the {{GitStatusConsumer.consumeLine}} method which is oriented towards a _line_ of output. Instead, I detect when the "{{--porcelain}}" output is surrounded by quotation marks and I dequote it in a manner consistent with the way that Git quoted it. The other main change was to get away from treating the file name as a URI since it is not a URI. A filename can contain characters that are not allowed in a URI and trying to treat a filename as a relative URI is not a good fit. Please review this and let me know what you think and if additional revisions are required. Thanks. > GitStatusConsumer does not properly handle quoted paths output from > GitStatusCommand > ------------------------------------------------------------------------------------ > > Key: SCM-772 > URL: https://jira.codehaus.org/browse/SCM-772 > Project: Maven SCM > Issue Type: Bug > Components: maven-scm-provider-git > Affects Versions: 1.9, 1.9.1 > Environment: All > Reporter: Gary Peskin > Attachments: maven-scm.patch > > > We have several files in our repository with spaces in the file name. Even > with --porcelain specified, the filename appears with quotes around it. Here > is an example: > {noformat} > M src/main/webapp/admin-index.html > M src/main/webapp/adminhelp/en_US/css/AboutThisBook.css > M "src/main/webapp/adminhelp/en_US/css/Appendix A Role Manager Defs.css" > {noformat} > This messes up the regular expression parsing in GitStatusConsumer. > A better approach would be to modify GitStatusCommand to specify the > {{"\-z"}} option instead of the {{"--porcelain"}} option. This option is > specifically designed to generate machine parseable output from the git > status command. This would necessitate changes to GitStatusConsumer but > would allow the elimination of all of the regex parsing in GitStatusConsumer > making for a more reliable solution. > If you'd like, please let me know and I can work up a patch for the changes > to these two classes and send it on. -- This message was sent by Atlassian JIRA (v6.1.6#6162)