]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Support "git log --oneline" in generated commit messages.
authorGary V. Vaughan <gary@gnu.org>
Sat, 22 May 2010 11:10:27 +0000 (18:10 +0700)
committerGary V. Vaughan <gary@gnu.org>
Sat, 22 May 2010 11:10:27 +0000 (18:10 +0700)
* clcommit.m4sh (func_check_commit_msg): Insert an empty line
between the ChangeLog entry summary line and the ChangeLog entry
body, so that "git log --oneline" works properly.
Bump copyright and version number.
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

ChangeLog
clcommit.m4sh

index 89d69da41c18019f4663be013921b44907dfa438..0eb77fffb1029530f1daf2b8455cf3b3b3ba49ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-05-22  Gary V. Vaughan  <gary@gnu.org>
+
+       Support "git log --oneline" in generated commit messages.
+       * clcommit.m4sh (func_check_commit_msg): Insert an empty line
+       between the ChangeLog entry summary line and the ChangeLog entry
+       body, so that "git log --oneline" works properly.
+       Bump copyright and version number.
+       Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
 2010-05-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * HACKING: Set Reply-To: in announcement emails.
index 351076a3e342a532e4a8e757ba7ad23a67a99c90..8c14be2aa6f638c2e5697d4d3766092ba686f8dd 100644 (file)
@@ -1,11 +1,11 @@
 AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl
 # @configure_input@
 
-# clcommit (GNU @PACKAGE@) version 2.0
+# clcommit (GNU @PACKAGE@) version 2.0.1
 # Written by Gary V. Vaughan <gary@gnu.org>
 # and Alexandre Oliva <aoliva@redhat.com>
 
-# Copyright (C) 1999, 2000, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -319,6 +319,7 @@ func_check_commit_msg ()
     fi
 
     func_verbose "$progname: checking commit message..."
+    separate_summary=:         # whether to separate summary lines for git
     if $opt_first; then
       skipping=:
       $SED 's,^,+,' < ${ChangeLog-ChangeLog} |
@@ -328,8 +329,18 @@ func_check_commit_msg ()
             "+ "*)
              func_error "*** Warning: lines should start with tabs, not spaces; ignoring line:"
              echo "$line" | $SED 's/^.//' >&2;;
-            "+ "*)
-              $skipping || echo "$line" ;;
+            "+ *"*)                    # asterisk marks end of summary line
+              $skipping || echo "$line"
+             separate_summary=false ;;
+            "+ "*".")                  # summary line must end with a period
+             $skipping || {
+               echo "$line"
+               $separate_summary && echo "+    "
+               separate_summary=false
+             };;
+           "+  "*)                     # no separator for multiline summary
+             echo "$line"
+             separate_summary=false ;;
           esac
         done |
           $SED 's,^\+  ,,' > "$log_file" || exit $EXIT_FAILURE
@@ -345,7 +356,16 @@ func_check_commit_msg ()
              func_error "*** Warning: lines should start with tabs, not spaces; ignoring line:"
              echo "$line" | $SED 's/^.//' >&2;;
             "+") echo ;;
-            "+ "*) echo "$line";;
+            "+ *"*)                    # asterisk marks end of summary line
+             echo "$line"
+              separate_summary=false ;;
+            "+ "*".")                  # summary line must end with a period
+             echo "$line"
+             $separate_summary && echo "+      "
+             separate_summary=false ;;
+           "+  "*)                     # no separator for multiline summary
+             echo "$line"
+             separate_summary=false ;;
           esac
         done |
           $SED -e 's,\+        ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \