summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2003-02-02 16:01:20 +0000
committerAndreas Gruenbacher <agruen@suse.de>2003-02-02 16:01:20 +0000
commita89abd10bba6aeee4dec9a52856dd6aa6c51bb2c (patch)
treeff7dd5e7a2e048b66c58650465b8d38b6435dd01
parent734afb59685219380ef06590e2f4ead7ea387e5a (diff)
downloadquilt-a89abd10bba6aeee4dec9a52856dd6aa6c51bb2c.tar.gz
Add quilt diff --diff=... option (for tkdiff, etc.)
-rw-r--r--quilt.changes5
-rw-r--r--quilt/diff.in23
2 files changed, 25 insertions, 3 deletions
diff --git a/quilt.changes b/quilt.changes
index 827ba4c..9ac64f0 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -3,6 +3,11 @@ Sun Feb 2 15:23:20 +0100 2003 - agruen@suse.de
- Make quilt setup recognize the "# Sourcedir:" directive.
- Fix bug with spurious `Index:' lines in diff/refresh output.
+- Add --diff option to quilt diff that allows to specify a
+ different utility that diff to run files through. (That utility
+ is only called for files that contain differences, not for
+ files that are in a patches' file list but jave not been
+ changed.)
-------------------------------------------------------------------
Sat Feb 1 18:52:15 +0100 2003 - agruen@suse.de
diff --git a/quilt/diff.in b/quilt/diff.in
index ac6ea9a..e764a5c 100644
--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -58,6 +58,20 @@ EOF
fi
}
+do_diff()
+{
+ local file=$1 suffix=$2 old_file=$3 new_file=$4
+ if [ -n "$opt_diff" ]
+ then
+ if ! @DIFF@ -q $old_file $new_file >/dev/null
+ then
+ $opt_diff $old_file $new_file
+ fi
+ else
+ diff_file $file $suffix $old_file $new_file
+ fi
+}
+
die ()
{
local status=$1
@@ -65,7 +79,7 @@ die ()
exit $status
}
-options=`getopt -o p:P:c:zh -- "$@"`
+options=`getopt -o p:P:c:zh --long diff: -- "$@"`
if [ $? -ne 0 ]
then
@@ -91,6 +105,9 @@ do
shift ;;
-h)
usage -h ;;
+ --diff)
+ opt_diff=$2
+ shift 2 ;;
--)
shift
break ;;
@@ -254,9 +271,9 @@ do
suffix=".orig"
fi
old_file=$(backup_file_name $first_patch $file)
- diff_file $file $suffix $old_file $new_file
+ do_diff $file $suffix $old_file $new_file
else
- diff_file $file ".orig" "$workdir/$file" $new_file
+ do_diff $file ".orig" "$workdir/$file" $new_file
fi
if [ $? -ne 0 ]