File: git-check-commits

package info (click to toggle)
bird2 2.18-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,644 kB
  • sloc: ansic: 75,250; sh: 3,807; perl: 3,444; lex: 887; xml: 520; makefile: 511; python: 495; sed: 13
file content (19 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

git log --oneline | awk \
  '{
    # Ignore two fixups deeply buried inside the history
    if (index("a54f75f454b7ed8c8ff2c1787a506528f22cbae7", $1) == 1)
      next;
    if (index("bea582cbb53e30dd32a5b6829c7443e0e5558d11", $1) == 1)
      next;

    # Complain about fixups and WIPs
    if ((index($2, "fixup!") == 1) || (index($2, "WIP") == 1))
    {
      if (!bad) print "Branch contains unfinished work!"
      bad = 1
      print
    }
  }
  END { if (bad) exit 1 }'