corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriela Gibson <>
Subject LIttle perl alias for easy log message production
Date Sat, 07 Mar 2015 18:06:06 GMT
For your .bashrc file:

alias gitdifflogmesg="perl -ne 'BEGIN {print \"[[[\";} /^\\+\\+\\+
b\\/(\\S+)/ && print \"\\n\\n* \$1\";  /^@\
@.*[ *]([^ ]+)\(/ && print \"\\n  (\$1).\"; END { print \"\\n\\n]]]\\n\";}'"

Usage: cat malloc.patch | gitdifflogmesg

This lists the files you've changed as * dir/file with all the functions
modified as (function name) underneath.

A good patch to test this on is here: (if
only for mass of ammunition :)

Expected output:

* DocFormats/api/src/Operations.c

* DocFormats/core/src/common/DFTable.c

* DocFormats/core/src/css/CSS.c

<snip long list>


Where no (function) is mentioned, something else happened, like a new
#include entry.

Of course log message sometimes don't need to be in that much depth, but,
such a list can sometimes be rather handy, and it saves much typing, all
that is then needed is to add the descs for the changes, if so desired.

It probably needs more improvement, but, this is a good starting point I


Visit my Coding Diary:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message