uscode icon indicating copy to clipboard operation
uscode copied to clipboard

More descriptive commit messages

Open darconeous opened this issue 13 years ago • 5 comments

It would be great if the commit messages could contain a brief explanation of what sections changed. Perhaps like...

Updates titles 07, 08, and 11

or, in cases where minor changes are made to one of the titles, (like with this commit) you could summarize this way:

Updates title 11, minor changes to title 09

The later is a little more difficult, but it could help readability.

darconeous avatar Apr 20 '11 21:04 darconeous

It's done automatically, so it would be problematic. You can see the changes in /code/.

Kwpolska avatar May 01 '11 18:05 Kwpolska

It's a good point, though, and it seems like it wouldn't be too difficult to examine the diff and generate a summary of which sections changed. I'll look at it when I get some time.

divegeek avatar May 02 '11 05:05 divegeek

I agree with this.

Someone should start a company to get some legislative official to fork it and maintain it. You know like an olive branch to the development community.

And yes this is one of those hand wavy "someone not me" comments :)

williscool avatar May 25 '12 06:05 williscool

I think it would be awesome to be able to see commit messages from the person actually responsible for the change. I think github does gravatars even for people who aren't registered users. Perhaps someone could create gravatars with publicly available photos of the relevant legislator.

cayblood avatar May 25 '12 10:05 cayblood

It's a good point, though, and it seems like it wouldn't be too difficult to examine the diff and generate a summary of which sections changed.

It'd probably be easier with the xml version of the code, but with the text version of the code, how about this:

  1. grep for a newline followed by a + or a - (That's what diffs use to show what changed)
  2. return the line number for all lines matched like this; these are your "changes"
  3. grep for section headings and return the relevant ones' line numbers
  4. for each set of changes, return the section heading immediately preceding (in terms of line numbers) that set of changes, including that section heading's number
  5. for each section heading number returned, include it in the commit message

cooljeanius avatar Jun 09 '13 13:06 cooljeanius