File: gitsetup.sh

package info (click to toggle)
mupdf 1.14.0%2Bds1-4%2Bdeb10u3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 57,116 kB
  • sloc: ansic: 314,752; java: 2,498; javascript: 1,210; python: 655; makefile: 494; sh: 206; sed: 13; awk: 6
file content (11 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

# Tell git to fix whitespace errors automatically
git config apply.whitespace fix

# Set up useful aliases:
git config alias.wsfix "! git diff HEAD >P.diff && git apply -R P.diff && git apply --whitespace=fix P.diff && rm P.diff"
git config alias.wsfixi "! git diff --cached >P.diff && git apply --cached -R P.diff && git apply --cached --whitespace=fix P.diff && rm P.diff"

# Copy hooks:
cp scripts/githooks/* .git/hooks/