]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Don't warn about the blank line inserted into git commit message.
authorGary V. Vaughan <gary@gnu.org>
Wed, 9 Jun 2010 10:03:22 +0000 (17:03 +0700)
committerGary V. Vaughan <gary@gnu.org>
Wed, 9 Jun 2010 10:03:22 +0000 (17:03 +0700)
* clcommit.m4sh: When searching for accidental commits of mutliple
changes, ignore the second line of the message, which we inserted
earlier to support "git log --oneline".

ChangeLog
clcommit.m4sh

index a7776be207aa1ecf05f44430aef62a260c46ab29..275575be893ea2f518b3c88ab68f30cea235a8b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-06-09  Gary V. Vaughan  <gary@gnu.org>
 
+       Don't warn about the blank line inserted into git commit message.
+       * clcommit.m4sh: When searching for accidental commits of mutliple
+       changes, ignore the second line of the message, which we inserted
+       earlier to support "git log --oneline".
+
        Enable correct extraction of multiline copyright from --version.
        * libltdl/config/getopt.m4sh: Wrap copyright notice at 76
        columns.
index c79e6b94d82416c1efb855357a45ee07b74f3e45..93d5f99249a756cf27c6658bb71ab395698319cd 100644 (file)
@@ -337,7 +337,9 @@ func_mailnotify ()
   grep '[^     ]' < "$log_file" > /dev/null ||
     func_fatal_error "empty commit message, aborting"
 
-  if grep '^$' < "$log_file" > /dev/null; then
+  # We expect line 2 to be blank, since it separates the git summary line from
+  # the commit message body, but any others are probably an error:
+  if sed 2d "$log_file" | grep '^$' > /dev/null; then
     func_error "*** Warning: blank lines should not appear within commit messages."
     func_error "*** They should be used to separate distinct commits."
   fi