[cmake-developers] the first line must not be more than 78 characters

Michael Wild themiwi at gmail.com
Fri Jul 30 04:09:41 EDT 2010


On 30. Jul, 2010, at 10:03 , Mathieu Malaterre wrote:

> Hi there,
> 
>  I tried to push a bug fix to next, but I did get an error back:
> 
> Counting objects: 15, done.
> Delta compression using up to 16 threads.
> Compressing objects: 100% (8/8), done.
> Writing objects: 100% (8/8), 1.58 KiB, done.
> Total 8 (delta 6), reused 0 (delta 0)
> ----------------------------------------------------------------------
> commit 6a3d7d46 has an invalid message:
>  the first line must not be more than 78 characters
> commit message is:
> BUG: 0009611 Fix Arch independent FindJNI.cmake on Linux to support
> Sun Java, OpenJDK, Kaffe and GCJ paths. Based on patch from debian
> ----------------------------------------------------------------------
> error: hook declined to update refs/heads/next
> To git at cmake.org:cmake.git
> ! [remote rejected] next -> next (hook declined)
> error: failed to push some refs to 'git at cmake.org:cmake.git'
> 
> 
>  Is there an easy way to change the commit line ?
> 
> Thanks
> -- 
> Mathieu

If the patch in question is HEAD, then just to a "git commit --amend" and edit the message. Otherwise, do a "git rebase --interactive commit^" where commit is the (partial) hash of the commit in question and in the editor that pops up, mark the line with the commit in question with an "e", save and quite and then do a "git commit --amend" followed by "git rebase --continue".

There are other, more low-level ways of doing this, but these are pretty universal and can also be used for many other purposes.

HTH

Michael



More information about the cmake-developers mailing list