From 53819365cf8b1dad870cf97a1f33bd7579f6b6ed Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 28 Nov 2005 00:46:13 +0000 Subject: - 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. --- scripts/patchfns.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/patchfns.in') 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 -- cgit