From 8c53406b7b0840fa11888a71be214b37ac4b6e4f Mon Sep 17 00:00:00 2001
From: Matthew Fernandez <matthew.fernandez@gmail.com>
Date: Fri, 30 Sep 2022 19:12:32 -0700
Subject: [PATCH] sccmap: re-enable non-silent output when '-v' is passed
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Unix command line tools generally have a “last option wins” kind of semantics,
wherein it is valid to pass options multiple times or in combination with other
options that do their opposite. Thus when calling `sccmap -S -v`, the user could
reasonably expect that `-v` (“verbose”) reversed the effect of `-S` (“silent”).
This is also what the man page implies. But this was not what the code was
doing.
---
 CHANGELOG.md       | 2 ++
 cmd/tools/sccmap.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index b63c3f052..bc9c1223e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   `libgvplugin_gs.so.6`) #2280
 - trailing commas issue with fdp layout #2282
 - Missing `-S` in `sccmap` man page usage summary.
+- In `sccmap`, a `-v` option following a `-S` option now re-enables strongly
+  connected component output that the man page implied.
 
 ## [6.0.1] – 2022-09-11
 
diff --git a/cmd/tools/sccmap.c b/cmd/tools/sccmap.c
index 58a51171c..2387bb3ce 100644
--- a/cmd/tools/sccmap.c
+++ b/cmd/tools/sccmap.c
@@ -284,6 +284,7 @@ static void scanArgs(int argc, char **argv)
 	    break;
 	case 'v':
 	    Verbose = 1;
+	    Silent = 0;
 	    break;
 	case 'S':
 	    Verbose = 0;
-- 
2.40.0