From 13adcee7a6c3155c788e12a99d38ebfe0d58dd2b Mon Sep 17 00:00:00 2001 From: Vinzenz Bargsten Date: Wed, 8 Mar 2023 21:51:06 +0100 Subject: [PATCH 1/2] if not in debug mode return immediately from PrintTree --- pkg/btrfs-diff.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/btrfs-diff.go b/pkg/btrfs-diff.go index bd1db35..17c1468 100644 --- a/pkg/btrfs-diff.go +++ b/pkg/btrfs-diff.go @@ -166,18 +166,16 @@ func debugInd(ind int, msg string, params ...interface{}) { // print a diff tree (only if debug mode is enabled) func (node *nodeInst) PrintTree(w io.Writer, root bool, padding string, lenParent int, indexParent int) { - if node == nil { + if node == nil || !debugMode { return } - if debugMode { fmt.Fprintf(w, "%s%s (St:%v, ori:%v, parent:%v)\n", padding+getBoxPadding(root, getBoxType(indexParent, lenParent)), node.Name, node.State, node.Original, node.Parent) - } index := 0 for _, child := range node.Children { From a6507b43bcdf3bbabb8f0cd48b750f3ad1b15937 Mon Sep 17 00:00:00 2001 From: Vinzenz Bargsten Date: Tue, 18 Jul 2023 14:00:05 +0200 Subject: [PATCH 2/2] adding to contributors list as requested in PR #8 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12ecfaa..ccb4035 100644 --- a/README.md +++ b/README.md @@ -312,7 +312,7 @@ Extended, fixed, and maintained by: [Michael Bideau](https://github.com/mbideau) With a lot of thanks to : * [Mek101](https://github.com/Mek101): very good crash-tester :wink: - +* [vbargsten](https://github.com/vbargsten): testing and debugging support ## Copyright and License GPLv3