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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# We create our own working directory to be able to verify
# all patch formats, including the ones which mention the
# base directory.
$ mkdir -p d/patches
$ cd d
$ cat > test.txt
< 1
< 2
< old
< 4
< 5
$ quilt new test
> Patch %{P}test is now on top
$ quilt add test.txt
> File test.txt added to patch %{P}test
$ cat > test.txt
< 1
< 2
< new
< 4
< 5
$ quilt diff
> Index: d/test.txt
> ===================================================================
> --- d.orig/test.txt
> +++ d/test.txt
> @@ -1,5 +1,5 @@
> 1
> 2
> -old
> +new
> 4
> 5
$ quilt diff --no-index
> --- d.orig/test.txt
> +++ d/test.txt
> @@ -1,5 +1,5 @@
> 1
> 2
> -old
> +new
> 4
> 5
$ quilt diff -R
> Index: d/test.txt
> ===================================================================
> --- d.orig/test.txt
> +++ d/test.txt
> @@ -1,5 +1,5 @@
> 1
> 2
> -new
> +old
> 4
> 5
$ quilt diff -U1
> Index: d/test.txt
> ===================================================================
> --- d.orig/test.txt
> +++ d/test.txt
> @@ -2,3 +2,3 @@
> 2
> -old
> +new
> 4
$ quilt diff -c
> Index: d/test.txt
> ===================================================================
> *** d.orig/test.txt
> --- d/test.txt
> ***************
> *** 1,5 ****
> 1
> 2
> ! old
> 4
> 5
> --- 1,5 ----
> 1
> 2
> ! new
> 4
> 5
$ quilt diff -C1
> Index: d/test.txt
> ===================================================================
> *** d.orig/test.txt
> --- d/test.txt
> ***************
> *** 2,4 ****
> 2
> ! old
> 4
> --- 2,4 ----
> 2
> ! new
> 4
$ quilt diff -p ab
> Index: b/test.txt
> ===================================================================
> --- a/test.txt
> +++ b/test.txt
> @@ -1,5 +1,5 @@
> 1
> 2
> -old
> +new
> 4
> 5
|