File: git-desc

package info (click to toggle)
quilt 0.60-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,856 kB
  • sloc: sh: 5,425; perl: 1,312; lisp: 430; makefile: 414
file content (11 lines) | stat: -rwxr-xr-x 316 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
#! /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