Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude not working on 2.3.1 on El Capitan #64

Open
timbroder opened this issue Aug 17, 2016 · 7 comments
Open

Exclude not working on 2.3.1 on El Capitan #64

timbroder opened this issue Aug 17, 2016 · 7 comments

Comments

@timbroder
Copy link

Always getting: Tim Broder | 15,231 which is wrong. The pod directory was committed at one point, then removed

Any other info I can give?

Thanks!

bash-3.2$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
bash-3.2$ git fame
Git Fame: |=============================================================================================================================================================================================|

Statistics based on master
Active files: 392
Active lines: 58,633
Total commits: 696

Note: Files matching MIME type image, binary has been ignored

+--------------------+--------+---------+-------+--------------------+
| name               | loc    | commits | files | distribution (%)   |
+--------------------+--------+---------+-------+--------------------+
| Yannick Cahn       | 30,744 | 37      | 158   | 52.4 /  5.3 / 40.3 |
| Tim Broder         | 15,231 | 528     | 296   | 26.0 / 75.9 / 75.5 |
| Michael Helmbrecht | 11,101 | 122     | 151   | 18.9 / 17.5 / 38.5 |
| Simon Weingand     | 1,557  | 1       | 26    |  2.7 /  0.1 /  6.6 |
| SimonWeingand      | 0      | 8       | 0     |  0.0 /  1.1 /  0.0 |
+--------------------+--------+---------+-------+--------------------+
5 rows in set
bash-3.2$ git fame --exclude=KidFund/Pods*
Git Fame: |=============================================================================================================================================================================================|

Statistics based on master
Active files: 392
Active lines: 58,633
Total commits: 696

Note: Files matching MIME type image, binary has been ignored

+--------------------+--------+---------+-------+--------------------+
| name               | loc    | commits | files | distribution (%)   |
+--------------------+--------+---------+-------+--------------------+
| Yannick Cahn       | 30,744 | 37      | 158   | 52.4 /  5.3 / 40.3 |
| Tim Broder         | 15,231 | 528     | 296   | 26.0 / 75.9 / 75.5 |
| Michael Helmbrecht | 11,101 | 122     | 151   | 18.9 / 17.5 / 38.5 |
| Simon Weingand     | 1,557  | 1       | 26    |  2.7 /  0.1 /  6.6 |
| SimonWeingand      | 0      | 8       | 0     |  0.0 /  1.1 /  0.0 |
+--------------------+--------+---------+-------+--------------------+
5 rows in set
bash-3.2$ git fame --exclude=KidFund/Pods**
Git Fame: |=============================================================================================================================================================================================|

Statistics based on master
Active files: 392
Active lines: 58,633
Total commits: 696

Note: Files matching MIME type image, binary has been ignored

+--------------------+--------+---------+-------+--------------------+
| name               | loc    | commits | files | distribution (%)   |
+--------------------+--------+---------+-------+--------------------+
| Yannick Cahn       | 30,744 | 37      | 158   | 52.4 /  5.3 / 40.3 |
| Tim Broder         | 15,231 | 528     | 296   | 26.0 / 75.9 / 75.5 |
| Michael Helmbrecht | 11,101 | 122     | 151   | 18.9 / 17.5 / 38.5 |
| Simon Weingand     | 1,557  | 1       | 26    |  2.7 /  0.1 /  6.6 |
| SimonWeingand      | 0      | 8       | 0     |  0.0 /  1.1 /  0.0 |
+--------------------+--------+---------+-------+--------------------+
5 rows in set

bash-3.2$ git fame --exclude=KidFund/Pods/*
Git Fame: |=============================================================================================================================================================================================|

Statistics based on master
Active files: 392
Active lines: 58,633
Total commits: 696

Note: Files matching MIME type image, binary has been ignored

+--------------------+--------+---------+-------+--------------------+
| name               | loc    | commits | files | distribution (%)   |
+--------------------+--------+---------+-------+--------------------+
| Yannick Cahn       | 30,744 | 37      | 158   | 52.4 /  5.3 / 40.3 |
| Tim Broder         | 15,231 | 528     | 296   | 26.0 / 75.9 / 75.5 |
| Michael Helmbrecht | 11,101 | 122     | 151   | 18.9 / 17.5 / 38.5 |
| Simon Weingand     | 1,557  | 1       | 26    |  2.7 /  0.1 /  6.6 |
| SimonWeingand      | 0      | 8       | 0     |  0.0 /  1.1 /  0.0 |
+--------------------+--------+---------+-------+--------------------+
5 rows in set
@oleander
Copy link
Owner

Hi,

I'm not sure I understand your question Are you trying to remove Pods from the results, or does it include Pods, a directory that has been deleted?

@oleander
Copy link
Owner

Btw, try adding --verbose | grep Pods to list all directories with the word Pods being used.

@timbroder
Copy link
Author

Pods is in the folder system and was at one point checked in. It no longer is. But it looks to me like it's still picking up the commits from that directory from when it was checked in. I'd like it to be excluded from the reports

Thanks!

@oleander
Copy link
Owner

git fame is using the entire commit tree to calculate its stats. So if you ever commited a directory it will be included, unless you manually exclude it.

What's the output from the --verbose command I suggested?

@oleander
Copy link
Owner

Could you verify that your pattern KidFund/Pods/* is matched here http://www.globtester.com/?

@duffyjp
Copy link

duffyjp commented Jul 12, 2017

I'm having trouble with this too. I'm trying to exclude the public directory of a Rails app.

MacOS Sierra here.

exclude = "**/public/*"

GitFame::Base.new(repository: '.', exclude: exclude ).to_csv

globster example

I'm still seeing lots of public if I use the --verbose flag to troubleshoot:

git fame --verbose --exclude="**/public/*" --before=2011-09-01 2>&1 | grep public

Sample:

blame --encoding=UTF-8 -p -M --date=local 08b60e07ea222edf89a5a452d35c0ad438caae6a  -- 'public/stylesheets/jquery-ui.css'

@duffyjp
Copy link

duffyjp commented Jul 12, 2017

Perhaps a dependency or even ruby needs to be locked at a lower version somewhere?

git clone https://github.com/oleander/git-fame-rb.git
cd git-fame-rb/
bundle
rspec
Finished in 21.87 seconds (files took 0.53493 seconds to load)
95 examples, 74 failures

Failed examples:

rspec ./spec/bin_spec.rb[1:5] # bin/git-fame should support --sort=name
rspec ./spec/bin_spec.rb[1:6] # bin/git-fame should support --sort=commits
rspec ./spec/bin_spec.rb[1:7] # bin/git-fame should support --sort=loc
rspec ./spec/bin_spec.rb[1:8] # bin/git-fame should support --hide-progressbar
rspec ./spec/bin_spec.rb[1:9] # bin/git-fame should support --whitespace
rspec ./spec/bin_spec.rb[1:10] # bin/git-fame should support --by-type
rspec ./spec/bin_spec.rb[1:11] # bin/git-fame should support --include=hello
rspec ./spec/bin_spec.rb[1:12] # bin/git-fame should support --exclude=hello
rspec ./spec/bin_spec.rb[1:13] # bin/git-fame should support --extension=rb,ln
rspec ./spec/bin_spec.rb[1:14] # bin/git-fame should support --branch=master
rspec ./spec/bin_spec.rb[1:15] # bin/git-fame should support --format=csv
rspec ./spec/bin_spec.rb[1:16] # bin/git-fame should support --format=pretty
rspec ./spec/bin_spec.rb[1:17] # bin/git-fame should support --before=2010-01-01
rspec ./spec/bin_spec.rb[1:18] # bin/git-fame should support --after=1980-01-01
rspec ./spec/bin_spec.rb[1:21] # bin/git-fame should support --verbose
rspec ./spec/bin_spec.rb[1:22] # bin/git-fame should support --everything
rspec ./spec/bin_spec.rb[1:23] # bin/git-fame should support --timeout=10
rspec ./spec/bin_spec.rb[1:24] # bin/git-fame should support --timeout=-1
rspec ./spec/bin_spec.rb:50 # bin/git-fame dates should fail on invalid before date
rspec ./spec/bin_spec.rb:56 # bin/git-fame dates should fail on invalid after date
rspec ./spec/bin_spec.rb[1:27:2] # bin/git-fame sort should be able to sort by name
rspec ./spec/bin_spec.rb[1:27:3] # bin/git-fame sort should be able to sort by commits
rspec ./spec/bin_spec.rb[1:27:4] # bin/git-fame sort should be able to sort by loc
rspec ./spec/bin_spec.rb[1:27:5] # bin/git-fame sort should be able to sort by files
rspec ./spec/git_fame_spec.rb:5 # GitFame::Base#authors should have a list of authors
rspec ./spec/git_fame_spec.rb:16 # GitFame::Base#authors author should have a bunch of commits
rspec ./spec/git_fame_spec.rb:20 # GitFame::Base#authors author should respond to name
rspec ./spec/git_fame_spec.rb:24 # GitFame::Base#authors author should have a number of locs
rspec ./spec/git_fame_spec.rb:28 # GitFame::Base#authors author should have a number of files
rspec ./spec/git_fame_spec.rb:32 # GitFame::Base#authors author should have a distribution
rspec ./spec/git_fame_spec.rb:61 # GitFame::Base total should respond to #loc, #commits and #files
rspec ./spec/git_fame_spec.rb:69 # GitFame::Base sort should be able to sort #authors by name
rspec ./spec/git_fame_spec.rb:78 # GitFame::Base sort should be able to sort #authors by commits
rspec ./spec/git_fame_spec.rb:88 # GitFame::Base sort should be able to sort #authors by files
rspec ./spec/git_fame_spec.rb:97 # GitFame::Base sort should be able to sort #authors by loc
rspec ./spec/git_fame_spec.rb:115 # GitFame::Base exclude should exclude the lib folder
rspec ./spec/git_fame_spec.rb:119 # GitFame::Base exclude should exclude non rb or rdoc files
rspec ./spec/git_fame_spec.rb:123 # GitFame::Base exclude should exclude non matching paths
rspec ./spec/git_fame_spec.rb:143 # GitFame::Base types should break out counts by file type
rspec ./spec/git_fame_spec.rb:147 # GitFame::Base types should output zero for file types the author hasn't touched
rspec ./spec/git_fame_spec.rb:160 # GitFame::Base include should exclude the lib folder
rspec ./spec/git_fame_spec.rb:164 # GitFame::Base include should exclude non rb or rdoc files
rspec ./spec/git_fame_spec.rb:168 # GitFame::Base include should exclude non matching paths
rspec ./spec/git_fame_spec.rb:174 # GitFame::Base glob should exclude
rspec ./spec/git_fame_spec.rb:181 # GitFame::Base glob should include
rspec ./spec/git_fame_spec.rb:190 # GitFame::Base#pretty_print should print
rspec ./spec/git_fame_spec.rb:198 # GitFame::Base#csv_print should print
rspec ./spec/git_fame_spec.rb:204 # GitFame::Base#csv_print should be equal to
rspec ./spec/git_fame_spec.rb:215 # GitFame::Base branches should handle existing branches
rspec ./spec/git_fame_spec.rb:231 # GitFame::Base branches should not raise on empty branch (use fallback)
rspec ./spec/git_fame_spec.rb:245 # GitFame::Base after should raise error if 'after' is to far in the future
rspec ./spec/git_fame_spec.rb:254 # GitFame::Base after should handle same day as HEAD
rspec ./spec/git_fame_spec.rb:261 # GitFame::Base after should handle an out of scope 'after' date
rspec ./spec/git_fame_spec.rb:270 # GitFame::Base before should raise error if 'before' is to far back in history
rspec ./spec/git_fame_spec.rb:279 # GitFame::Base before should handle same day as last commit
rspec ./spec/git_fame_spec.rb:286 # GitFame::Base before should handle an out of scope 'before' date
rspec ./spec/git_fame_spec.rb:293 # GitFame::Base before should handle same day as last commit
rspec ./spec/git_fame_spec.rb:320 # GitFame::Base span should handle spans as inclusive
rspec ./spec/git_fame_spec.rb:328 # GitFame::Base span should should possible a wide date span (include all)
rspec ./spec/git_fame_spec.rb:336 # GitFame::Base span should handle a too early 'after'
rspec ./spec/git_fame_spec.rb:344 # GitFame::Base span should catch empty commit span
rspec ./spec/git_fame_spec.rb:354 # GitFame::Base span should handle a too late 'before'
rspec ./spec/git_fame_spec.rb:362 # GitFame::Base span should handle the after date same date as init commit
rspec ./spec/git_fame_spec.rb:370 # GitFame::Base span should handle an existing before with an old after
rspec ./spec/git_fame_spec.rb:378 # GitFame::Base span should handle an existing after with an old before
rspec ./spec/git_fame_spec.rb:396 # GitFame::Base span should raise error if set too high
rspec ./spec/git_fame_spec.rb:406 # GitFame::Base span should raise error if set too low
rspec ./spec/git_fame_spec.rb:416 # GitFame::Base span should handle same day
rspec ./spec/git_fame_spec.rb:424 # GitFame::Base span should handle same day (HEAD)
rspec ./spec/git_fame_spec.rb:432 # GitFame::Base span should handle same day (last commit)
rspec ./spec/git_fame_spec.rb:440 # GitFame::Base span should handle a non existent 'after' date
rspec ./spec/git_fame_spec.rb:448 # GitFame::Base span should handle a non existent 'before' date
rspec ./spec/git_fame_spec.rb:456 # GitFame::Base span should handle both non existent 'before' and 'after'
rspec ./spec/git_fame_spec.rb:466 # GitFame::Base sub modules should ignore any sub modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants