From ac22d12b8552ecc1bcb816519b7995bff6abafaa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Wed, 13 Aug 2014 15:33:48 +0200
Subject: [PATCH] Doc: Improved robustness of extractor change detector.

Use git diff instead of git show.

This means that meerges now will be handled correctly.
---
 .../Tools.pmod/Standalone.pmod/git_export_autodoc.pike      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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 fc94b3876b..fdc4e895cc 100644
--- a/lib/modules/Tools.pmod/Standalone.pmod/git_export_autodoc.pike
+++ b/lib/modules/Tools.pmod/Standalone.pmod/git_export_autodoc.pike
@@ -713,7 +713,10 @@ void export_autodoc_for_ref(string ref)
     }
 
     // Not previously converted.
-    if( doc_refs[ref] && !has_doc_commits(git("show",src_rev)) )
+    mapping(string:array(string)) src_commit = get_commit(work_git, src_rev);
+    if( doc_refs[ref] && src_commit->parent &&
+	!has_doc_commits(git("diff", "--pretty=raw",
+			     src_commit->parent[0] + ".." + src_rev)) )
     {
         // Not relevant for autodoc.
         src_to_doc[src_rev] = doc_refs[ref];
@@ -729,7 +732,6 @@ void export_autodoc_for_ref(string ref)
     git("clean", "-f", "-d", "-q", "src", "lib");
 
     // Create a corresponding commit in the documentation.
-    mapping(string:array(string)) src_commit = get_commit(work_git, src_rev);
     array(string) doc_parents = ({});
     string prev_autodoc_sha1;
     string prev_refdoc_sha1 = "";
-- 
GitLab