diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-01-17 19:25:32 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2014-01-17 19:25:32 +0100 |
commit | f2f17aae2cafdeff2b6b8fb4a30c431794534f02 (patch) | |
tree | 611b03c4f0f7f9ca845f6f85572067cf85d7601a | |
parent | 6886ae262b9bec7786220adff1df399e206eafed (diff) | |
download | quilt-f2f17aae2cafdeff2b6b8fb4a30c431794534f02.tar.gz |
Fix refreshing of patches emptying a file
Quilt can now import patches emptying a file, however the proper
header formatting is lost on refresh. Fix it.
The format is still not correct for patches creating a file. This is
because quilt creates an empty backup file for every non-existent file
being added to a patch. This is how quilt remembers that the file is
modified by the top-most patch. Ideally the list of files belonging to
the top-most patch should be stored separately in a metadata file.
That being said, it is not critical in practice because GNU patch
makes no difference between adding contents to a new file and adding
contents to an empty file.
-rw-r--r-- | quilt/scripts/patchfns.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in index 43f5f71..c96701a 100644 --- a/quilt/scripts/patchfns.in +++ b/quilt/scripts/patchfns.in @@ -736,7 +736,7 @@ diff_file() || old_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \ -r "$old_file") fi - if ! [ -s "$new_file" ] + if ! [ -e "$new_file" ] then [ $opt_strip_level = 0 ] \ && old_hdr=$new_hdr |