emacs-devel
[Top][All Lists]
Advanced

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

Re: Your commit 7409a79


From: Stephen Leake
Subject: Re: Your commit 7409a79
Date: Sat, 06 Dec 2014 16:43:34 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt)

Tom <address@hidden> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> Please always start the commit log summary line with a capital letter,
>> and end the sentence with a period.  (Actually, in the above
>> particular case the summary line is redundant and could be omitted --
>> but this is a stylistic comment, not a requirement.)
>> 
>> Also, renaming a file needs an entry in the target's ChangeLog, like
>> this:
>> 
>>   * CONTRIBUTE: Renamed from etc/CONTRIBUTE.
>> 
>> and it also should end with a period, not a comma.
>> 
>
> These are exactly the situations where a server side commit hook
> is really useful for the following reasons:
>
> 1. It prevent commits with incorrectly formatted commit messages.

To be precise, if it's only running on the server (Savannah), it does
not prevent the _commit_, it prevents the _push_.

There are a couple commit hooks in emacs/.git/hooks set by autogen.sh
(amazing what you learn reading commit logs :); we could add a hook
there to do this check.

vc could check for proper formatting before doing the commit. Catching
errors as early as possible is always better.

Of course, it would be even better if vc would silently fix the
formatting.

> 2. It prints an error message describing the problem, thereby
> teaching the committer how to make a properly formatted commit.
>
> So there is no need for manually replying to incorrect commits
> on the list, because the script checks every commit and even 
> tells the user the problem.
>
> So it would be a good idea to add such a precommit script to the
> server.

If we go this route, let's also add some vc functionality that checks
and/or does the formatting, and make sure the commit error message
mentions both CONTRIBUTE and the vc function.

-- 
-- Stephe



reply via email to

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