From a63e09363549b16ba22d14b41812a008ecbe4127 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Fri, 30 Apr 2021 22:59:07 +0200 Subject: [PATCH 10/11] etc: committer: Ignore let bindings. Hopefully they aren't important in practice, for deciding on the commit message! * etc/committer.scm.in (change-commit-message/one-pass)[explain-make-flags/change]: Ignore 'let' and 'let*' bindings, only use the last expression. (unwrap-list)[unwrap-list]: Ignore 'let' and 'let*' bindings, only use the expression that is inside. --- etc/committer.scm.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/committer.scm.in b/etc/committer.scm.in index 7fbeb1874e..c056de912c 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -305,6 +305,8 @@ Return false if all changes could be explained and truth otherwise." (case (car list) ((quasiquote quote) (second list)) ((list) (cdr list)) + ;; Hopefully the bindings weren't important ... + ((let let*) (last list)) (else (error "I can't interpret that as a list!")))) (define* (change-commit-message/one-pass @@ -396,6 +398,8 @@ SUMMARY: first using a ‘void port’, then with the ‘real’ output port." (format port " Use the C++ cross-compiler, instead of hardcoding \"g++\".") #t) + ((((or 'let 'let*) _ exp) . _) (explain-make-flags/change exp y)) + ((_ . ((or 'let 'let*) _ exp)) (explain-make-flags/change x exp)) (_ #f))) (define (explain-phases/change x y) (match (cons x y) -- 2.31.1