From d416a365ca4df6e99fced318033d34be4407ecfb Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 27 Feb 2022 14:36:35 +0300 Subject: [PATCH] Do not print target of the self in -dot --- dot.go | 5 ++++- usage.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dot.go b/dot.go index d1433b5..33f5d85 100644 --- a/dot.go +++ b/dot.go @@ -57,8 +57,11 @@ func dotWalker(data map[DotNodes]bool, tgtOrig string) (map[DotNodes]bool, error data[DotNodes{tgtOrig, cwdMustRel(cwd, m["Target"])}] = true case DepTypeIfchange: dep = m["Target"] + if dep == tgt { + continue + } data[DotNodes{tgtOrig, cwdMustRel(cwd, dep)}] = false - if isSrc(cwd, dep) || dep == tgt { + if isSrc(cwd, dep) { continue } data, err = dotWalker(data, cwdMustRel(cwd, dep)) diff --git a/usage.go b/usage.go index 3625634..2c9b1a0 100644 --- a/usage.go +++ b/usage.go @@ -24,7 +24,7 @@ import ( ) const ( - Version = "1.23.0" + Version = "1.24.0" Warranty = `Copyright (C) 2020-2022 Sergey Matveev This program is free software: you can redistribute it and/or modify -- 2.44.0