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

list index out of range #88

Open
kajalpani opened this issue Aug 29, 2018 · 3 comments
Open

list index out of range #88

kajalpani opened this issue Aug 29, 2018 · 3 comments

Comments

@kajalpani
Copy link

I am getting the following error when I try to execute
./gitstats -c start_date="$(date +%Y-%m-%d -d "3 month ago")" "/repository/<repo_name>/.git" "/repository/gitresult"

Error:
[0.00403] >> git shortlog -s --since="2018-05-29" "HEAD" | wc -l
[0.00518] >> git show-ref --tags
[0.00352] >> git rev-list --pretty=format:"%at %ai %aN <%aE>" --since="2018-05-29" "HEAD" | grep -v ^commit
Traceback (most recent call last):
File "./gitstats", line 1490, in
g.run(sys.argv[1:])
File "./gitstats", line 1465, in run
data.collect(gitpath)
File "./gitstats", line 338, in collect
timezone = parts[3]
IndexError: list index out of range

Surprisingly, It works when I change the date to 4 month ago. I have no idea why it the error is occurring. Is it something related to different commits in repository?

@laughingwula
Copy link

You can add the following code

  1. After line (for line in lines):
    if len(line) == 0:
    continue
  2. After line (for revline in revlines:)
    if len(revline) == 0:
    continue

@atasen19
Copy link

Non of them don't work for me

@Yangwendaxia
Copy link

this issue is caused by there is no commits after the start_date specified.

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

No branches or pull requests

4 participants