]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
Makefile.am: generate ChangeLog with git log instead of git2cl
authorR. Diez <rdiezmail-openocd@yahoo.de>
Fri, 1 Nov 2024 19:21:56 +0000 (20:21 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 16 Nov 2024 14:20:06 +0000 (14:20 +0000)
git log is faster than git2cl and the result has a better format.

Change-Id: I465ca62e3e30fed230fe9661e82a987980c05459
Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8531
Tested-by: jenkins
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
.gitmodules
Makefile.am
tools/git2cl [deleted submodule]

index f2da17ed7a813fe03e265e03df05177cc71789fd..abb773538272d98b0c6eb9de5331f906c67ae484 100644 (file)
@@ -1,6 +1,3 @@
-[submodule "tools/git2cl"]
-       path = tools/git2cl
-       url = https://git.savannah.nongnu.org/git/git2cl.git
 [submodule "jimtcl"]
        path = jimtcl
        url = https://github.com/msteveb/jimtcl.git
index ab0a2373d54c7bfb55e93164f29ee68a779a6ab7..155a2b3bb72c343b145cbfa78416dfe20e222a49 100644 (file)
@@ -123,14 +123,13 @@ TCL_PATH = tcl
 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
                sed -e 's,^$(srcdir)/$(TCL_PATH),,'
 
-# Without the PERL_UNICODE="IO" workaround below when running git2cl, you get several
-# "Wide character" warnings and you also risk an invalid character encoding in
-# the generated ChangeLog file. For more information, see this bug report:
-#   Warning "Wide character in print"
-#   https://savannah.nongnu.org/bugs/?65689
+# The git log command below generates many empty text lines with only some space characters
+# for indentation purposes, so use sed to trim all trailing whitespace.
 dist-hook:
        if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
-               git --git-dir $(srcdir)/.git log | PERL_UNICODE="IO" $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
+               git --git-dir $(srcdir)/.git log --date=short --pretty="format:%ad  %aN <%aE>%n%n%w(0,4,6)* %B" \
+               | sed 's/[[:space:]]*$$//' > $(distdir)/ChangeLog.tmp && \
+               mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
        fi
        for i in $$($(TCL_FILES)); do \
                j="$(distdir)/$(TCL_PATH)/$$i" && \
diff --git a/tools/git2cl b/tools/git2cl
deleted file mode 160000 (submodule)
index 8373c9f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 8373c9f74993e218a08819cbcdbab3f3564bbeba