File: get-the-git-commit-count.sh

package info (click to toggle)
coot 1.1.18%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220,004 kB
  • sloc: cpp: 495,934; python: 35,043; ansic: 26,143; lisp: 22,768; sh: 13,186; makefile: 2,746; awk: 441; xml: 245; csh: 14
file content (10 lines) | stat: -rw-r--r-- 176 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
if command -v git > /dev/null ; then
    if git status > /dev/null 2>&1 ; then
        git rev-list --count HEAD 2>/dev/null
    else
        echo 0
    fi
else
    echo 0
fi