summaryrefslogtreecommitdiffstats
path: root/quilt.quiltrc
blob: 2240742a49c12b11e8255bd4d9f298281675e073 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Example /etc/quilt.quiltrc

# Options passed to GNU diff when generating patches
QUILT_DIFF_OPTS="--show-c-function"
# Options passed to GNU patch when applying patches
#QUILT_PATCH_OPTS="--ignore-whitespace"

# Options to pass to commands (QUILT_${COMMAND}_ARGS)
QUILT_PUSH_ARGS="--color=auto"
QUILT_DIFF_ARGS="--no-timestamps --color=auto"
QUILT_REFRESH_ARGS="--no-timestamps --backup"

# Prefix all patch names with the relative path to the patch?
QUILT_PATCHES_PREFIX=yes

# The following ``mail'' command filter recognizes the format we use for
# kernel patches inside SUSE. The format is as follows (slightly
# simplified; Signed-off-by and Acked-by lines optional):
#
#   From: author@some.where
#   Subject: One-line summary
#
#   Patch description
#
#   Signed-off-by: reviewer@some.where
#   Acked-by: reviewer@some.where
#
#   <<patch>>
#
# To enable, remove or comment out the lines above and below the function.

: <<'EOF'
quilt_mail_patch_filter() {
	local x=$(cat)
	# Replace subject with patch summary, add anybody in To or Cc
	# headers as recipients, and take all people in Signed-off-by
	# and Acked-by into the Cc (excluding myself).
	echo "$x" \
	| sed -n -e "/${LOGNAME:-$(whoami)}@$(hostname -d)/d" \
	       -e 's/^\(To\|Cc\):/Recipient-\1:/ip' \
	       -e 's/^\(Signed-off-by\|Acked-by\):/Recipient-Cc:/ip' \
	       -e 's/^Subject:/Replace-Subject:/p' \
	       -e '/^\*\*\*\|---/q'
	echo
	# Discard the patch header, and pass on the rest
	echo "$x" | awk '
	!in_body && (/^[-A-Za-z]+:/ || /^$/) { next }
	{ in_body = 1 ; print }
	'
}
EOF