From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT) Description of problem: While it's good gendiff can make diff from single directory structure, it's more useful to have diffs looking like they were generated the traditionaly way, from two directories, i.e. the extenstion marking originals is appended to directory name instead of file name. How reproducible: Always Steps to Reproduce: This would change gendiff behaviour to what I described: --- gendiff.orig Wed Jul 25 14:49:02 2001 +++ gendiff Wed Jul 25 14:49:02 2001 @@ -6,9 +6,12 @@ exit 1 } +d=`echo $1 | sed -e 's#/$##'` find $1 \( -name "*$2" -o -name ".*$2" \) -print | while read f; do U=-u [ "${f##*/}" == "ChangeLog$2" ] && U=-U0 - diff ${U} $f `echo $f | sed s/$2\$//` + # pretend we're making diff the traditional way + diff ${U} $f `echo $f | sed s/$2\$//` \ + | sed -e "1 s#^--- ${d}\\([^[:space:]]*\\)$2\\(.*\\)\$#--- ${d}$2\\1 \\2#" done Additional info: This is controverse. Just forget it, if you see a reason why not to change it.
It seems my browser broke the before-last line of the patch, it should read (everyhing on one line): | sed -e "1 s#^--- ${d}\\([^[:space:]]*\\)$2\\(.*\\)\$#--- ${d}$2\\1\\2#"
This would be the Right Thing To Do only if there were a stronger convention on naming files that were diffed. SInce patch does the Right Thing anyways, I see little reason to adjust the output of gendiff to conform to a mostly nonexistent convention.