From 8ff6e9798f9909594ad497bc70d39a3cf3bbf2e9 Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Mon, 2 Sep 2013 18:44:00 -0400 Subject: Ignore files generated by Version Control Systems [from: a_m0d] - Ignore files which version control software (aka revision control software or configuration management software) places in a working directory. This version ignores files used by SVN, git, and Mercurial. "This is done by simply testing whether the path name includes a directory name used by these systems, and ignoring the file if it does. This results in much more accurate SLOCcounts. - See: https://sourceforge.net/p/sloccount/patches/14/ --- break_filelist | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'break_filelist') diff --git a/break_filelist b/break_filelist index 3b10299..877051f 100755 --- a/break_filelist +++ b/break_filelist @@ -1285,6 +1285,11 @@ while ( $dir = shift ) { print STDERR "Filename is: $file\n"; next; } + if ($file =~ /.*\/(\.git|\.svn|\.hg)\/.*/) { + # File is part of the RCS software + # Don't count it, as it is generated automatically + next; + } $file_type = &get_file_type($file); if ($file_type) { &record_file_type($file, $file_type); -- cgit v1.2.1