gitrev-typed
Copyright(c) 2015 Adam C. Foltzer 2025 Thomas Bidne
LicenseBSD3
Maintainertbidne@protonmail.com
Safe HaskellNone
LanguageHaskell2010

Development.GitRev

Description

Untyped Template Haskell splices for including git information in your project.

Since: 0.1

Synopsis

Documentation

gitBranch :: ExpQ Source #

Return the branch (or tag) name of the current git commit, or UNKNOWN if not in a git repository. For detached heads, this will just be HEAD.

Examples

Expand
λ. $gitBranch
"main"

Since: 0.1

gitCommitCount :: ExpQ Source #

Return the number of commits in the current head.

Examples

Expand
λ. $gitCommitCount
"47"

Since: 0.1

gitCommitDate :: ExpQ Source #

Return the commit date of the current head.

Examples

Expand
λ. $gitCommitDate
"Mon Apr 14 22:14:44 2025 +1200"

Since: 0.1

gitDescribe :: ExpQ Source #

Return the long git description for the current git commit, or UNKNOWN if not in a git repository.

Examples

Expand
λ. $gitDescribe
"1.2.0-14-g40b5d7b"

Since: 0.1

gitDiff :: ExpQ Source #

Return the diff of the working copy with HEAD.

Examples

Expand
λ. $gitDiff
"diff ..."

Since: 0.1

gitDirty :: ExpQ Source #

Return True if there are non-committed files present in the repository.

Examples

Expand
λ. $gitDirty
False

Since: 0.1

gitDirtyTracked :: ExpQ Source #

Return True if there are non-commited changes to tracked files present in the repository.

Examples

Expand
λ. $gitDirtyTracked
False

Since: 0.1

gitHash :: ExpQ Source #

Return the hash of the current git commit, or UNKNOWN if not in a git repository.

Examples

Expand
λ. $gitHash
"e67e943dd03744d3f93c21f84e127744e6a04543"

Since: 0.1

gitShortHash :: ExpQ Source #

Return the short hash of the current git commit, or UNKNOWN if not in a git repository.

Examples

Expand
λ. $gitShortHash
"e67e943"

Since: 0.1

gitTree :: ExpQ Source #

Return the hash of the current tree.

Examples

Expand
λ. $gitTreeQ
"b718a493773568bbf920a4710b5b83bd1762dbb9"

Since: 0.1