summaryrefslogtreecommitdiffstats
path: root/test/nolink.test
blob: e7d4173a5de75cd2cc47e7c8ac57eee7218d511c (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
	$ mkdir patches

# quilt should preserve hard links and not create new ones
	$ echo foo > foo
	$ ln foo foo2
	$ ls -l foo | awk '{ print $2 }'
	> 2

	$ quilt new test.diff
	> Patch patches/test.diff is now on top

	$ quilt add foo
	> File foo added to patch patches/test.diff

	$ ls -l foo | awk '{ print $2 }'
	> 1

	$ ls -l .pc/test.diff/foo | awk '{ print $2 }'
	> 2

	$ echo "foo changed" > foo
	$ quilt refresh
	> Refreshed patch patches/test.diff

	$ quilt new test2.diff
	> Patch patches/test2.diff is now on top

	$ quilt add foo
	> File foo added to patch patches/test2.diff

	$ ls -l foo | awk '{ print $2 }'
	> 1

	$ ls -l .pc/test2.diff/foo | awk '{ print $2 }'
	> 1

	$ echo "foo changed again" > foo
	$ quilt refresh
	> Refreshed patch patches/test2.diff

	$ quilt pop -q
	> Removing patch patches/test2.diff
	> Now at patch patches/test.diff

	$ ls -l foo | awk '{ print $2 }'
	> 1

	$ quilt pop -q
	> Removing patch patches/test.diff
	> No patches applied

	$ ls -l foo | awk '{ print $2 }'
	> 2

# quilt revert should not create hard links
	$ echo bar > bar
	$ quilt push -q
	> Applying patch patches/test.diff
	> Now at patch patches/test.diff

	$ quilt add bar
	> File bar added to patch patches/test.diff
	$ echo "bar changed" > bar
	$ quilt revert bar
	> Changes to bar in patch patches/test.diff reverted

	$ ls -l bar | awk '{ print $2 }'
	> 1

	$ quilt pop -q
	> Removing patch patches/test.diff
	> No patches applied