quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH] Fix interaction between quilt and vimdiff


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] Fix interaction between quilt and vimdiff
Date: Fri, 2 Mar 2012 13:58:00 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )

Using vimdiff as a diff viewer in quilt breaks if QUILT_PAGER is set.
So inhibit the pager in that case. Other diff viewers may be affected
as well but I don't know how to fix this in a generic way, short of
inhibiting the pager as soon as option --diff is passed to the diff
command. Not sure if this desirable though, as I presume
non-interactive alternative diff viewers must exist too.
---
This is my attempt to fix:
https://bugzilla.novell.com/show_bug.cgi?id=749563

I would love to have a more generic fix. Bert, can you think of one?
Is it possible to detect whether the diff viewer is interactive or
not and disable the pager on the fly if it is? I guess not :(

 quilt/diff.in |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -211,6 +211,12 @@ done
 
 QUILT_DIFF_OPTS="$QUILT_DIFF_OPTS $opt_format"
 
+# Inhibit pager for interactive text-mode diff viewers
+case "$(basename $opt_diff)" in
+vimdiff)
+       QUILT_PAGER=
+esac
+
 opt_files=( $(for file in "$@"; do echo "$SUBDIR$file" ; done) )
 
 if [ $[0$opt_combine + 0$opt_snapshot + 0$opt_relative] -gt 1 ]

-- 
Jean Delvare
Suse L3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]