We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e085be4 commit 72d26f7Copy full SHA for 72d26f7
src/plugins/specs/specs.py
@@ -48,10 +48,10 @@ def specs(content):
48
content.updated = time.gmtime(os.stat(path).st_mtime)
49
content.gitrev = '(not yet committed)'
50
else:
51
- commits = repo.commits(path=path)
52
- assert len(commits) > 0
53
- content.updated = commits[0].committed_date
54
- content.gitrev = commits[0].id
+ commits = repo.iter_commits(paths=path)
+ commit = commits.next()
+ content.updated = datetime.fromtimestamp(commit.committed_date).timetuple()
+ content.gitrev = commit.hexsha
55
56
content.updated = time.strftime('%F %T UTC (%a, %d %B %Y)', content.updated)
57
0 commit comments