From 83deaaef152fca6970add7b83910d3c27752f3d8 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Sun, 16 Mar 2003 11:12:01 +0000 Subject: The patch filename was appended to the directory/file name in patches generated, like dir~patch/file and file~patch. This is unnecessary, and at most irritationg when patches are renamed. Use dir.orig/file and file.orig instead. Also for better readability add a separator line below `Index:', like in diffs CVS generates. --- scripts/patchfns.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/patchfns.in') diff --git a/scripts/patchfns.in b/scripts/patchfns.in index dd8b821..b0b13aa 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -529,7 +529,7 @@ fix_diff_header() diff_file() { - local file=$1 suffix=$2 old_file=$3 new_file=$4 + local file=$1 old_file=$2 new_file=$3 local old_hdr new_hdr line if [ ! -e "$old_file" -a ! -e "$new_file" ] @@ -538,11 +538,11 @@ diff_file() fi if [ $opt_strip_level -eq 0 ] then - old_hdr=$file$suffix + old_hdr=$file.orig new_hdr=$file else local dir=$(basename $PWD) - old_hdr=$dir$suffix/$file + old_hdr=$dir.orig/$file new_hdr=$dir/$file fi @@ -550,6 +550,7 @@ diff_file() if read line then echo "Index: $new_hdr" + echo "===================================================================" (echo "$line" ; cat) \ | fix_diff_header $old_hdr $new_hdr fi -- cgit