timvink / mkdocs-git-revision-date-localized-plugin

MkDocs plugin to add a last updated date to your site pages
https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/index.html
MIT License
198 stars 40 forks source link

More robust `count_commits()` #67

Closed timvink closed 2 years ago

timvink commented 2 years ago

Not sure what caused it, but this line:

https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/blob/b6b0d115f042f7d3b00c6a9fab242b1e56edaec6/mkdocs_git_revision_date_localized_plugin/ci.py#L88

Caused a

  File "/usr/local/lib/python3.9/site-packages/mkdocs_git_revision_date_localized_plugin/ci.py", line 88, in <listcomp>
    refs = [x.split()[0] for x in refs]
IndexError: list index out of range
timvink commented 2 years ago

Repo was cloned on Tekton using

/ko-app/git-init \
# other parms
    -depth="${DEPTH}"

Where default value of DEPTH is 1