kimmobrunfeldt / git-hours

Estimate time spent on a git repository
MIT License
774 stars 59 forks source link

At least commit count is wrong #67

Open SuperCuber opened 2 years ago

SuperCuber commented 2 years ago

Using a random repo I have:

$ git-hours
total commits: 1371
$ git rev-list --count --all
690

Maybe it's duplicating commits that were merged from another branch?

MilesCranmer commented 1 year ago

Same here, but seeing this with a factor of 40x! On my SymbolicRegression.jl repo, which has maybe ~100 merges to master:

$ git-hours
{
...
  },
  "total": {
    "hours": 1137,
    "commits": 90881
  }
}
$ git rev-list --count --all
2264

I tried specifying git-hours -b master but that doesn't fix this; it is still massively overcounting commits. @kimmobrunfeldt any idea why it is 40x overcounting? Maybe just removing the git merges from the history would be a quick way to fix it?