diff options
author | Jean Delvare <jdelvare@suse.de> | 2015-01-14 10:59:04 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2015-01-14 10:59:04 +0100 |
commit | 05b3de5cb40374e36e020180e24829cba7e6cc90 (patch) | |
tree | a42994750dc12ceb2bb76f62ffcb555cd9bf1e99 | |
parent | 8fc366ebc7d13918f10e9eda473329906778343e (diff) | |
download | quilt-05b3de5cb40374e36e020180e24829cba7e6cc90.tar.gz |
Test refresh behavior on hard-linked patches
If a patch file has hard links, refreshing it should break the links
so that the other copies are left unmodified. Test this behavior to
avoid breaking it accidentally.
-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 |