Add source commit ID in commit message when pushing #6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think it would be nice to have the source commit id in the pushed commit message. This makes it easier to figure out if there are changes to build and push.
The old implementation:
let run_git_rev_parse default =
let open Bos 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, _)) ->
Logs.warn (fun m -> m "Failed to get commit id: %a: %s"
Cmd.pp (OS.Cmd.run_info_cmd run_info)
value);
default
| Error `Msg e ->
Logs.warn (fun m -> m "Failed to get commit id: %s" e);
default
This would as well be nice to have 👍