Lines Matching +full:rev +full:- +full:parse
2 # SPDX-License-Identifier: GPL-2.0
7 if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
8 head="$(git rev-parse --verify HEAD 2>/dev/null)"; then
10 if [ -z "$(git describe --exact-match 2>/dev/null)" ]; then
11 # Add -g and 8 hex chars.
12 printf '%s%s' -g "$(echo $head | cut -c1-8)"
16 # which might be read-only.
17 # You cannot use 'git describe --dirty' because it tries to
19 # First, with git-status, but --no-optional-locks is only
20 # supported in git >= 2.14, so fall back to git-diff-index if
21 # it fails. Note that git-diff-index does not refresh the
23 # git-update-index(1), git-diff-index(1), and git-status(1).
25 git --no-optional-locks status -uno --porcelain 2>/dev/null ||
26 git diff-index --name-only HEAD
28 printf '%s' -dirty
33 echo $(sed -n '1p' VERSION | tr -d '\n')$(scm_version)