summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-11-28 00:46:13 +0000
committerAndreas Gruenbacher <agruen@suse.de>2005-11-28 00:46:13 +0000
commit53819365cf8b1dad870cf97a1f33bd7579f6b6ed (patch)
treea3737a06f43257905c91cb4ec3cc3635953e83f8 /scripts
parent95ba9d63e774ecfcdd553ce8a5c31e451e075408 (diff)
downloadquilt-53819365cf8b1dad870cf97a1f33bd7579f6b6ed.tar.gz
- quilt/diff.in, quilt/refresh.in: stop using /dev/null for added
or removed files: GNU diff does not do that either, and for removed files this leads to headers that only reference $file.orig and /dev/null, so the actual file is not found. (This is only truly fixes -p0 style patches as -p1 style patches use dir.orig/file instead of dir/file.orig so the filename is not lost, but stopping to use /dev/null makes sense for -p style patches just the same. - files command: remove a redundant find_patch(). - Make top_patch() fail if there is no top patch.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/patchfns.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/patchfns.in b/scripts/patchfns.in
index ec4f865..714c7a6 100644
--- a/scripts/patchfns.in
+++ b/scripts/patchfns.in
@@ -314,7 +314,8 @@ cat_series()
top_patch()
{
- [ -e $DB ] && tail -n 1 $DB
+ local patch=$(tail -n 1 $DB 2>/dev/null)
+ [ -n "$patch" ] && echo "$patch"
}
is_numeric()
@@ -538,7 +539,6 @@ diff_file()
if ! [ -s "$old_file" ]
then
old_file=/dev/null
- old_hdr=/dev/null
[ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
|| old_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
else
@@ -549,7 +549,6 @@ diff_file()
if ! [ -s "$new_file" ]
then
new_file=/dev/null
- new_hdr=/dev/null
[ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
|| new_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
else