[
https://issues.apache.org/jira/browse/SCM-772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17962933#comment-17962933
]
ASF GitHub Bot commented on SCM-772:
------------------------------------
jira-importer opened a new issue, #979:
URL: https://github.com/apache/maven-scm/issues/979
**[Gary L
Peskin](https://issues.apache.org/jira/secure/[email protected])**
opened
**[SCM-772](https://issues.apache.org/jira/browse/SCM-772?redirect=false)** and
commented
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:
```
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"
```
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.
---
**Affects:** 1.9, 1.9.1
**Attachments:**
-
[maven-scm.patch](https://issues.apache.org/jira/secure/attachment/12718911/maven-scm.patch)
(_41.32 kB_)
> GitStatusConsumer does not properly handle quoted paths output from
> GitStatusCommand
> ------------------------------------------------------------------------------------
>
> Key: SCM-772
> URL: https://issues.apache.org/jira/browse/SCM-772
> Project: Maven SCM (Moved to GitHub Issues)
> Issue Type: Bug
> Components: maven-scm-provider-gitexe
> Affects Versions: 1.9, 1.9.1
> Environment: All
> Reporter: Gary L Peskin
> Assignee: Robert Scholte
> Priority: Major
> Fix For: 1.9.5
>
> 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
(v8.20.10#820010)