File: configure.commit

package info (click to toggle)
vbindiff 3.0-beta5-2
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,220 kB
  • sloc: cpp: 2,374; sh: 1,003; perl: 110; makefile: 96; lisp: 13
file content (13 lines) | stat: -rwxr-xr-x 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /bin/sh
# Display the SHA1 of the commit in which configure.ac was last modified.
# If it's not checked in yet, use the SHA1 of HEAD plus -dirty.

if [ ! -d .git ] ; then
  # if no .git directory, assume they're not using Git
  printf 'unknown commit'
elif git diff --quiet HEAD -- configure.ac ; then
  # configure.ac is not modified
  printf 'commit %s' `git rev-list --max-count=1 HEAD -- configure.ac`
else # configure.ac is modified
  printf 'commit %s-dirty' `git rev-parse HEAD`
fi