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

GitDiffConsumer cannot parse moved files

    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

        1. SCM-991.patch
          6 kB
          Jean-Noel Rouvignac

        Issue Links

          Activity

            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: