jmollan / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

Suggestions for improving commit messages (wrap length) #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Andrew D. Stadler (Google) <stadler@android.com> on Tue Jun 09 
13:22:04 PDT 2009
Source: JIRA REPO-36

In gerrit-209 I asked if we could wrap the display of long commit messages,
which were forcing H scrolling on the web page.  Shawn said no, because no
other git tools handle wrapping either.  The expectation is that that git
messages must wrap at 80 (in fact, apparently there is a style guide somewhere
that the first line should wrap at 60.

Since the onus is on the writer to follow these guidelines, here are some
suggestions to make things better in the workflow.

1.  When the user types "git commit", the editor should be launched with hard-
wrapping enabled (this is done already in "g4 change".  e.g. vi -c "set
textwidth=80"

2.  When the user types "repo upload", suggest checking the message and
offering warnings such as:

$ repo upload path/to/file
warning:  commit message should wrap at 80 column limit.  continue anyway?  (y/
n)

This is lightweight, does not block "I really meant to do it", and will never
appear once you remember to write your comments that way.

Original issue reported on code.google.com by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by sop+code@google.com on 24 Sep 2009 at 11:08