Menu

#98 cloc diff does'nt count same or modified

v1.61
open
nobody
None
1
2015-02-25
2013-09-04
Anonymous
No

cloc-1.60 increments the added/removed values instead of the same or modified values in some cases.

When I run:
C:\Test>cloc-1.60.exe --diff .\temp\1\ .\temp\4\ --skip-uniqueness

then I get:
...
SUM:
same 0 0 0 0
modified 0 0 0 0
added 1 0 0 1
removed 3 0 0 3

The directory 1 and 4 contains a pair of same files but "same" is 0.

1 Attachments

Discussion

  • Al Danial

    Al Danial - 2013-09-05
    • status: open --> accepted
     
  • Al Danial

    Al Danial - 2013-09-05

    Thanks for the report, and especially for the zip file--makes life much easier for me.

    The issue is this: temp/4 has just a single file and this throws a monkey wrench into the current logic which attempts to do a pair-wise alignment of files in the left set (temp/1) and the right set (temp/4). As soon as you add a second file to temp/4, the same count will go to 1.

    I'll work on this corner case of 1:N diff for the next release.

     
  • Al Danial

    Al Danial - 2013-09-05
    • Group: v1.59 --> v1.61
     
  • Anonymous

    Anonymous - 2014-06-10

    I was wondering what the status was of this issue

     
  • Al Danial

    Al Danial - 2014-06-10

    Believe me, I have not forgotten. This bug (and related #107) has been the millstone around my neck whose clean solution keeps slipping away from me. It is the one issue that has kept me from making the next release. All I can tell you is that I'm still on it.

     
  • Al Danial

    Al Danial - 2014-07-12

    svn commit 391 fixes this problem. Please try it out (using https://sourceforge.net/p/cloc/code/HEAD/tree/trunk/cloc) if you can.

     
  • Al Danial

    Al Danial - 2014-07-12
    • status: accepted --> pending
     
  • Al Danial

    Al Danial - 2014-07-30
    • status: pending --> closed
     
  • Al Danial

    Al Danial - 2014-07-30

    v1.62 released

     
  • Anonymous

    Anonymous - 2014-10-13

    still have the problem

     
  • Al Danial

    Al Danial - 2014-10-13

    please post a zip file with inputs that demonstrate the problem (using cloc v1.62)

     
  • Al Danial

    Al Danial - 2014-10-13
    • status: closed --> open
     
  • Anonymous

    Anonymous - 2014-10-21

    I've already submitted a bug:
    http://sourceforge.net/p/cloc/bugs/121/

     
  • Anonymous

    Anonymous - 2014-11-07

    I also face similar issue. Results for same set of files are not comparable for version 1.58 and 1.62. I also see same problem that is don't see "same" and "modified" data with --diff option.
    Is there any workaround for this issue till new release?

     
  • Al Danial

    Al Danial - 2014-11-07

    The diff logic changed between 1.58 and 1.62. In most cases the new logic gives more correct results. It is always possible for a diff to fail if there is not enough similarity between two sets. For starters, post a zip or tar file demonstrating the issue you're facing.

     

Anonymous
Anonymous

Add attachments
Cancel