diff options
-rw-r--r-- | test/hard-linked-patch.test | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/hard-linked-patch.test b/test/hard-linked-patch.test new file mode 100644 index 0000000..7063fd0 --- /dev/null +++ b/test/hard-linked-patch.test @@ -0,0 +1,36 @@ +If a patch file has hard links, refreshing it should break the links +so that the other copies are left unmodified. + +$ mkdir patches + +$ cat > patches/patch +< --- file.orig +< +++ file +< @@ -1 +1 @@ +< -a +< +b +$ echo patch -p0 > patches/series +$ ln patches/patch hardlink + +$ echo a > file +$ quilt push -q +> Applying patch patches/patch +> Now at patch patches/patch + +$ echo c > file +$ quilt refresh --no-index +> Refreshed patch patches/patch + +$ cat patches/patch +> --- file.orig +> +++ file +> @@ -1 +1 @@ +> -a +> +c + +$ cat hardlink +> --- file.orig +> +++ file +> @@ -1 +1 @@ +> -a +> +b |