From 57cc7ddbf961877226063df69b54c51377730edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Sun, 20 Nov 2011 15:50:47 +0100 Subject: [PATCH] Tools.Standalone.git_export_autodoc: Check two levels of parents for extraneous merges. --- .../Tools.pmod/Standalone.pmod/git_export_autodoc.pike | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/modules/Tools.pmod/Standalone.pmod/git_export_autodoc.pike b/lib/modules/Tools.pmod/Standalone.pmod/git_export_autodoc.pike index 33ed7b2414..3a855e6121 100644 --- a/lib/modules/Tools.pmod/Standalone.pmod/git_export_autodoc.pike +++ b/lib/modules/Tools.pmod/Standalone.pmod/git_export_autodoc.pike @@ -480,11 +480,15 @@ void export_autodoc_for_ref(string ref) if (sizeof(doc_parents) > 1) { // Check if all of the parents are needed. - // NB: We only check direct parents, but this should + // NB: We only check parents and grandparents, but this should // be sufficient in most circumstances. foreach(doc_parents, string parent) { if (doc_to_parents[parent]) { doc_parents -= (array)doc_to_parents[parent]; + foreach((array)doc_to_parents[parent], string grandparent) { + if (doc_to_parents[grandparent]) + doc_parents -= (array)doc_to_parents[grandparent]; + } } } } -- GitLab