Tarmil/FSharp.Data.LiteralProviders

Feature request: info from git

Closed this issue · 2 comments

It would be cool to be able to include the branch name if on a branch, the tagname if there is a tag on the current commit, the commit hash, and also the number of uncommitted changes.

I think directly implementing a git API would be an endless pit of adding features and subtleties. However a simpler and more extensible solution would be adding the ability to run a program and capture its output. So you could do something like

let branch = Exec<"git branch --show-current">.Output
let tag = Exec<"git describe --tags --exact-match">.Output

This is released with v1.0.