summaryrefslogtreecommitdiffstats
path: root/test/subdir.test
blob: 5e6bbdaac0fc9a342d03398e87aad3d40e49600d (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	$ mkdir d
	$ cd d

	$ mkdir subdir
	$ cat > subdir/file
	< old file

	$ quilt new test.patch
	> Patch test.patch is now on top

	$ quilt add subdir/file
	> File subdir/file added to patch test.patch

	$ cat > subdir/file
	< new contents

	This creates the patches/ directory:

	$ quilt refresh
	> Refreshed patch test.patch

	$ cd subdir
	$ quilt add file2
	> File subdir/file2 added to patch test.patch

	$ cat > file2
	< another file

	$ cat > file3
	< yet another file

	$ quilt add file3
	> File subdir/file3 added to patch test.patch

	$ rm file3
	$ quilt files
	> subdir/file
	> subdir/file2
	> subdir/file3

	$ quilt diff | sed -e "s/\\t.*//"
	> Index: d/subdir/file
	> ===================================================================
	> --- d.orig/subdir/file
	> +++ d/subdir/file
	> @@ -1 +1 @@
	> -old file
	> +new contents
	> Index: d/subdir/file2
	> ===================================================================
	> --- d.orig/subdir/file2
	> +++ d/subdir/file2
	> @@ -0,0 +1 @@
	> +another file
	> Index: d/subdir/file3
	> ===================================================================
	> --- d.orig/subdir/file3
	> +++ d/subdir/file3
	> @@ -1 +0,0 @@
	> -yet another file

	$ quilt refresh
	> Refreshed patch test.patch

	$ quilt remove file2
	> File subdir/file2 removed from patch test.patch

	$ quilt files
	> subdir/file
	> subdir/file3

	$ cd ../..
	$ rm -rf d