pub/scm/utils/korg/wotmate.git  about / heads / tags
mirror of https://git.kernel.org/pub/scm/utils/korg/wotmate.git/
   commit 951b1bf5b36411da7a53e383bb5d20afa029ffa9 (patch)
   parent 8ec25e7 Add graph-pgp-pathfinder.py
     tree 918a8273db921b27483297c47d340399e04cd5b1
   author Konstantin Ryabitsev <konstantin@linuxfoundation.org>  2019-02-18 08:28:13 -0500
committer Konstantin Ryabitsev <konstantin@linuxfoundation.org>  2019-02-18 08:28:13 -0500

Small tweak to path selection

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
---
 graph-paths.py   | 2 +-
 graph-to-full.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/graph-paths.py b/graph-paths.py
index dd64bd0..37c39d2 100755
--- a/graph-paths.py
+++ b/graph-paths.py
@@ -69,7 +69,7 @@ def get_key_paths(c, t_p_rowid, b_p_rowid, maxdepth=5, maxpaths=5):
             logger.info('`- found a path with %s members' % len(path))
             paths.append([t_p_rowid] + path)
             if len(path) > 2:
-                ignorekeys.append(path[-2])
+                ignorekeys += path[1:-2]
 
     if not paths:
         logger.critical('No paths found.')
diff --git a/graph-to-full.py b/graph-to-full.py
index 49e1387..525bedd 100755
--- a/graph-to-full.py
+++ b/graph-to-full.py
@@ -55,7 +55,7 @@ def get_key_paths(c, b_p_rowid, maxdepth=5):
             # we want to find maximum paths, so we unset _seenkeys
             wotmate._seenkeys = []
             if len(path) > 2:
-                ignorekeys.append(path[-2])
+                ignorekeys += path[1:-1]
 
     if not paths:
         logger.critical('No paths found to any fully trusted keys')


glossary
--------
Commit objects reference one tree, and zero or more parents.

Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.

Multiple parents means the commit is a merge.

Root commits have no ancestor.  Note that it is
possible to have multiple root commits when merging independent histories.

Every commit references one top-level tree object.

git clone https://yhbt.net/lore/pub/scm/utils/korg/wotmate.git