Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-772

GitStatusConsumer does not properly handle quoted paths output from GitStatusCommand

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9, 1.9.1
    • 1.9.5
    • None
    • All

    Description

      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.

      Attachments

        Activity

          People

            rfscholte Robert Scholte
            garyp@firstech.com Gary L Peskin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: