Skip to content

Commit

Permalink
Merge pull request #211 from jbadwaik/master
Browse files Browse the repository at this point in the history
Add `branch` as information available through git
  • Loading branch information
fralau authored Mar 9, 2024
2 parents 06834c6 + 0a85f66 commit 5721b9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mkdocs_macros/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def get_git_info():
'short_commit': ['git', 'rev-parse', '--short', 'HEAD'],
'commit': ['git', 'rev-parse', 'HEAD'],
'tag': ['git', 'describe', '--tags'],
'branch': ['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
# With --abbrev set to 0, git will find the closest tagname without any suffix
'short_tag': ['git', 'describe', '--tags', '--abbrev=0'],
'author': LAST_COMMIT + ["--pretty=format:%an"],
Expand Down

0 comments on commit 5721b9b

Please sign in to comment.