quilt diff passes output through a pager even with color options enabled

Bug #933617 reported by Steve Beattie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
quilt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Since moving to precise, quilt diff passes output through a pager even though the color option is set. This results in the output containing garbage color control characters like so:

ESC[32mIndex: b/parser/libapparmor_re/expr-tree.ccESC[00m
===================================================================
ESC[32m--- a/parser/libapparmor_re/expr-tree.ccESC[00m
ESC[32m+++ b/parser/libapparmor_re/expr-tree.ccESC[00m
ESC[33m@@ -189,7 +189,7 @@ESC[00m ESC[35mvoid normalize_tree(Node *t, int dir)ESC[00m
        for (;;) {
                if ((&epsnode == t->child[dir]) &&
                    (&epsnode != t->child[!dir]) &&
ESC[35m- dynamic_cast<TwoChildNode *>(t)) {ESC[00m
ESC[36m+ !dynamic_cast<TwoChildNode *>(t->child[!dir])) {ESC[00m
                        // (E | a) -> (a | E)
                        // Ea -> aE
                        Node *c = t->child[dir]

To reproduce, do quilt diff --color=auto or add the following to your ~/.quiltrc:

  QUILT_DIFF_ARGS="--color=auto"

and do quilt diff.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: quilt 0.50-2
ProcVersionSignature: Ubuntu 3.2.0-12.20-generic 3.2.2
Uname: Linux 3.2.0-12-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
CheckboxSubmission: 9c15077a0ca11678d04e060687c26674
CheckboxSystem: 5dc75472945f57d094b84e90feb97396
Date: Thu Feb 16 09:33:57 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: quilt
UpgradeStatus: Upgraded to precise on 2012-01-30 (17 days ago)

Revision history for this message
Steve Beattie (sbeattie) wrote :
Revision history for this message
Steve Beattie (sbeattie) wrote :

A workaround is to set

  QUILT_PAGER=''

in the ~/.quiltrc. If it's unset, it falls back to $PAGER or less.

Revision history for this message
Martin Quinson (mquinson) wrote :

For the record, I just set the default pager to "less -R" when none is used (upstream and in debian package). That should make this PEBKAC harder to reach.

tags: added: patch-accepted-debian patch-accepted-upstream
removed: amd64
Changed in quilt (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package quilt - 0.60-3

---------------
quilt (0.60-3) unstable; urgency=low

  * debian/control: specify the encoding to emacs at the file bottom,
    not the file top (Closes: #689554).
    This should help clumsy tools that get fooled when the control
    file begins with an empty paragraph, even if they should not break.
  * debian/control: Recommends less, as we use it in most commands
    (probably all but the raw push/pop ones). (LP: #1089601)
  * Add deb3 script to convert debian source package to new 3.0
    (quilt) format. Thanks to Osamu Aoki for that (Closes: #581186).
  * d/p/dep3mail: Allow mail subcommand to get the mail subject
    from dep3-formated patches, so that I can use it to report
    the changes done to quilt itself to my own upstream.
  * d/p/doc_search_of_patches: Document the fact that quilt searches
    for its `patches' directory in the same way that git searches for
    its configuration (Closes: #549482).
  * d/p/doc_exit_status: Document the exit status (Closes: #587001).
  * d/p/graph_depends_on_graphviz: Provide an informative message on
    'quilt graph' without graphviz being installed (Closes: #659944).
  * d/p/default_pager_less-R: Use 'less -R' as default pager (LP: #933617)

 -- Martin Quinson <email address hidden> Thu, 27 Dec 2012 17:06:19 +0100

Changed in quilt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.