File: pre-commit-crlf

package info (click to toggle)
mkgmap 0.0.0%2Bsvn4905-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,032 kB
  • sloc: java: 73,856; xml: 1,695; python: 713; sh: 240; makefile: 149; perl: 31
file content (22 lines) | stat: -rwxr-xr-x 401 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

REPOS="$1"
TXN="$2"

TMP=$(mktemp)
trap "rm -f $TMP" 0

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook

$SVNLOOK changed -t "$TXN" "$REPOS" | while read kind file
do
		$SVNLOOK -t "$TXN" cat "$REPOS" "$file" > $TMP
		file $TMP | grep -q 'with CRLF'
		if [ $? = 0 ]; then
				echo "File '$file' contains CRLF line endings" >&2
				exit 2
		fi
	done
exit $?