Files
wowlet/contrib/shell/git-utils.bash
2025-02-21 10:07:59 +01:00

14 lines
220 B
Bash

#!/usr/bin/env bash
git_root() {
git rev-parse --show-toplevel 2> /dev/null
}
git_head_commit() {
git rev-parse --short=12 HEAD
}
git_head_tag() {
echo -n $(git describe --exact-match HEAD 2> /dev/null)
}