kimmobrunfeldt / git-hours

Estimate time spent on a git repository
MIT License
769 stars 57 forks source link

--first-commit-add does not have any effect #65

Open jogc opened 3 years ago

jogc commented 3 years ago

Regardless if I put 0 or 1000 or nothing for first-commit-add it does not make any difference for the number of hours calculated.

$ git-hours 
{
  "X": {
    "name": "X",
    "hours": 233,
    "commits": 1218
  },
  "total": {
    "hours": 233,
    "commits": 1218
  }
}
$ git-hours --first-commit-add=0
{
  "X": {
    "name": "X",
    "hours": 233,
    "commits": 1218
  },
  "total": {
    "hours": 233,
    "commits": 1218
  }
}
$ git-hours --first-commit-add=1000
{
  "X": {
    "name": "X",
    "hours": 233,
    "commits": 1218
  },
  "total": {
    "hours": 233,
    "commits": 1218
  }
}
$ git-hours --version
1.5.0

It seems --max-commit-diff might have the same problem. Just installed git-hours with npm.

lowlyocean commented 3 years ago

I can confirm this as well

danielmhanover commented 2 years ago

seems like every option has no effect on the output now

nathanfranke commented 11 months ago

@kimmobrunfeldt There hasn't been an update since 1.5.0, so this is still a problem. https://www.npmjs.com/package/git-hours

Workaround:

And the --since argument works for me now.

(P.S. Instead of using sudo with npm -g, set NPM_CONFIG_PREFIX, in my case export NPM_CONFIG_PREFIX="$HOME/.local") (P.P.S. Installation takes a long time, 15+ minutes, perhaps because my ipv6 isn't working)