kimmobrunfeldt/git-hours

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

jogc opened this issue · 3 comments

jogc commented

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.

I can confirm this as well

seems like every option has no effect on the output now

@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:

  • npm r -g git-hours
  • npm i -g https://github.com/kimmobrunfeldt/git-hours

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)