include if git worktree was dirty

This commit is contained in:
Reynir Björnsson 2023-11-16 08:57:33 +01:00
parent 60e9541a70
commit 5c36a37ecd

View file

@ -127,7 +127,10 @@ let run_git_config key = function
let run_git_rev_parse default =
let open Bos in
let value = OS.Cmd.run_out Cmd.(v "git" % "rev-parse" % "HEAD") in
let value = OS.Cmd.run_out
Cmd.(v "git" % "describe" % "--always" % "--dirty"
% "--exclude=*" % "--abbrev=0")
in
match OS.Cmd.out_string value with
| Ok (value, (_, `Exited 0)) -> value
| Ok (value, (run_info, _)) ->