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

GitDiffConsumer cannot parse moved files

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      GitDiffConsumer keep outputting Unparseable line: when diffing a commit where a file was moved using git mv.

      The Unparseable line: message is output by GitDiffConsumer.consumeLine() because the code does not know how to handle the line starting with "similarity":

      diff --git a/org/pager/PagerTest.java b/org/pager/LocalPagerTest.java
      similarity index 87%
      rename from org/pager/PagerTest.java
      rename to org/pager/LocalPagerTest.java
      index 5d0f7b7705..90c87686c7 100644
      --- a/org/pager/PagerTest.java
      +++ b/org/pager/LocalPagerTest.java
      @@ -30,7 +30,7 @@ import org.testng.annotations.DataProvider;
       import org.testng.annotations.Test;
       
       @Test
      -public class PagerTest {
      +public class LocalPagerTest {
      
      

      I am using git version 2.25.1 .

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            michael-o Michael Osipov
            jnrouvignac Jean-Noel Rouvignac
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment