[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using VC for change descriptions

From: Joseph Myers
Subject: Re: Using VC for change descriptions
Date: Thu, 10 May 2018 17:19:52 +0000
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

On Thu, 10 May 2018, Thien-Thi Nguyen wrote:

> Anyway, that's the way i see it.  ISTM the resolution is clear:
> find a hacker who will write and maintain this tool.  I think
> most involved in this discussion are capable, but understand how
> IRL concerns may deter volunteering.

Well, I don't want to get into maintaining a tool I have no use for (and 
any such tool would inevitably need maintaining to add support for 
additional languages, coding styles, etc.).  Or into getting corporate 
lawyers to add it to a copyright assignment.

I think the basic logic for GNU-style C is very simple to get something 
significantly better than the diff hunk headers (and falling over in the 
same cases where ChangeLog format is particularly unsuitable because of 
the lack of well-defined entity names): (1) fold backslash-newline pairs; 
(2) identify funcname lines (same regular expression as used by git), with 
the text from a funcname line until the next one as a first approximation 
to a named entity; (3) if a funcname line has another such line 
immediately before and that other line doesn't include ';', it's probably 
a function return type on its own line, so combine those together into a 
single named entity; (4) extract #defines (including in the middle of 
functions) as their own named entities; (5) extract names from #defines 
and other named entities using appropriate regular expressions; (6) having 
done this for both revisions of a file, look for named entities present 
only in one revision, or present in both but with different content, and 
that's your list of changed entities (probably as good as you get in a 
ChangeLog in practice).

Joseph S. Myers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]