aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/winpty/src/shared/GetCommitHash.bat
blob: a9f8e9cef0fc24b89065c22e576dc8821dd39a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
@echo off

REM -- Echo the git commit hash.  If git isn't available for some reason,
REM -- output nothing instead.

git rev-parse HEAD >NUL 2>NUL && (
    git rev-parse HEAD
) || (
    echo none
)

REM -- Set ERRORLEVEL to 0 using this cryptic syntax.
(call )