git-hours icon indicating copy to clipboard operation
git-hours copied to clipboard

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

Open jogc opened this issue 4 years ago • 3 comments

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.

jogc avatar Sep 08 '21 06:09 jogc

I can confirm this as well

lowlyocean avatar Sep 10 '21 22:09 lowlyocean

seems like every option has no effect on the output now

danielmhanover avatar Oct 03 '21 18:10 danielmhanover

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

nathanfranke avatar Oct 17 '23 01:10 nathanfranke