Git : Add default for gdc.

This commit is contained in:
Dmitry Voronin 2024-02-26 18:58:55 +03:00
parent 51b55c85a1
commit b35afdcc96

View file

@ -165,10 +165,12 @@ function gg() {
git clone https://git.voronind.com/voronind/"${repo}"
}
# See diff for a specific commit.
# Usage: gdc <COMMITHASH>
# See diff for a specific commit. Last commit by default.
# Usage: gdc [COMMITHASH]
function gdc() {
git diff "${1}^!"
local hash="${1}"
[[ "${hash}" = "" ]] && hash="HEAD~"
git diff "${hash}^!"
}
# Get version number based on commit count.