mirror of https://gitee.com/openkylin/quilt.git
12 lines
316 B
Plaintext
12 lines
316 B
Plaintext
|
#! /bin/sh
|
||
|
|
||
|
if git rev-parse --show-cdup > /dev/null 2> /dev/null; then
|
||
|
tag=$(git describe --tags HEAD 2> /dev/null || \
|
||
|
git rev-parse --short HEAD)
|
||
|
dirty=$(git update-index --refresh --unmerged > /dev/null
|
||
|
if git diff-index --name-only HEAD | read dummy; then
|
||
|
echo -dirty
|
||
|
fi)
|
||
|
echo $tag$dirty
|
||
|
fi
|