Skip to content

Commit

Permalink
Set follow=True in git log fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
liang2kl committed Nov 23, 2022
1 parent 8827a6c commit aaee209
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mkdocs_blogging_plugin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_git_commit_timestamp(
if is_first_commit:
# diff_filter="A" will select the commit that created the file
commit_timestamp = git.log(
realpath, date="short", format="%at", diff_filter="A"
realpath, date="short", format="%at", diff_filter="A", follow=True
)
# A file can be created multiple times, through a file renamed.
# Commits are ordered with most recent commit first
Expand All @@ -101,7 +101,7 @@ def get_git_commit_timestamp(
commit_timestamp = commit_timestamp.split()[-1]
else:
commit_timestamp = git.log(
realpath, date="short", format="%at", n=1
realpath, date="short", format="%at", n=1, follow=True
)
except (InvalidGitRepositoryError, NoSuchPathError) as err:
logger.warning(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="mkdocs-blogging-plugin",
version="2.2.1",
version="2.2.2",
description="Mkdocs plugin that generates a blog index page sorted by creation date.",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit aaee209

Please sign in to comment.