[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] bug#22067: bug#22067: bug#20062: bug#20062: [PATCH] diff
From: |
Giuseppe Scrivano |
Subject: |
[bug-diffutils] bug#22067: bug#22067: bug#20062: bug#20062: [PATCH] diff: add support for --color |
Date: |
Mon, 01 Feb 2016 10:10:05 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Giuseppe Scrivano <address@hidden> writes:
> Bug 3 is a bug on all platforms, set_color_context should call
> process_signals only when color_context != RESET_CONTEXT. I'll send a
> patch for that.
I've attached a patch for this bug.
Regards,
Giuseppe
>From c9326d016a05c594b8cd2f19effe792c23fde3ef Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <address@hidden>
Date: Mon, 1 Feb 2016 09:58:52 +0100
Subject: [PATCH] Fix an infinite recursion with --color
* src/util.c: Call process_signals only when color_context is not
RESET_CONTEXT.
Reported by Gisle Vanem in http://debbugs.gnu.org/22067
---
src/util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util.c b/src/util.c
index bf9ed97..26615ca 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1349,7 +1349,8 @@ static enum color_context last_context = RESET_CONTEXT;
void
set_color_context (enum color_context color_context)
{
- process_signals ();
+ if (color_context != RESET_CONTEXT)
+ process_signals ();
if (colors_enabled && last_context != color_context)
{
put_indicator (&color_indicator[C_LEFT]);
--
2.5.0
- [bug-diffutils] bug#22067: bug#22067: bug#20062: bug#20062: [PATCH] diff: add support for --color,
Giuseppe Scrivano <=