all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: David Engster <deng@randomsample.de>
Cc: emacs-devel@gnu.org
Subject: Re: Missing changes in merges from emacs-25 to master
Date: Tue, 22 Mar 2016 16:45:30 -0700	[thread overview]
Message-ID: <56F1D91A.8020305@cs.ucla.edu> (raw)
In-Reply-To: <87zitqyvbe.fsf@engster.org>

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

On 03/22/2016 03:57 PM, David Engster wrote:
> why not simply
> fix this in `gitmerge-commit-message' through truncation, instead of
> using a '-' as commit message?

Thanks, good suggestion. I installed the attached into master.

[-- Attachment #2: 0001-Compute-a-better-commit-message-for-merges.txt --]
[-- Type: text/plain, Size: 2026 bytes --]

From 8c25e016ee06b2c2246986690af7ba779b9f0af8 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 22 Mar 2016 16:42:28 -0700
Subject: [PATCH] Compute a better commit message for merges
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by David Engster in:
http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg01270.html
* admin/gitmerge.el (gitmerge-commit-message):
Truncate the computed commit message to at most 72 characters per line.
(gitmerge-maybe-resume): Don’t use "-" as the commit message for
merges; use the computed commit message instead.
---
 admin/gitmerge.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index 74e6f80..6a52f7a 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -331,6 +331,10 @@ gitmerge-commit-message
 	   (if end (list (concat beg "~.." end))
 	     `("-1" ,beg)))
     (insert "\n")
+    ;; Truncate to 72 chars so that the resulting ChangeLog line fits in 80.
+    (goto-char (point-min))
+    (while (re-search-forward "^\\(.\\{69\\}\\).\\{4,\\}" nil t)
+      (replace-match "\\1..."))
     (buffer-string)))
 
 (defun gitmerge-apply (missing from)
@@ -432,14 +436,8 @@ gitmerge-maybe-resume
 	(when mergehead
 	  (with-current-buffer (get-buffer-create gitmerge-output-buffer)
 	    (erase-buffer)
-            ;; FIXME: We add "-m-" because the default commit message
-            ;; apparently tickles our commit hook:
-            ;;    Line longer than 78 characters in commit message
-            ;;    Line longer than 78 characters in commit message
-            ;;    Line longer than 78 characters in commit message
-            ;;    Commit aborted; please see the file CONTRIBUTE
 	    (unless (zerop (call-process "git" nil t nil
-					 "commit" "--no-edit" "-m-"))
+					 "commit" "--no-edit"))
 	      (error "Git error during merge - fix it manually"))))
 	;; Successfully resumed.
 	t))))
-- 
2.5.5


  reply	other threads:[~2016-03-22 23:45 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-20 11:36 Missing changes in merges from emacs-25 to master martin rudalics
2016-03-20 17:32 ` Eli Zaretskii
2016-03-20 18:38   ` martin rudalics
2016-03-20 18:50     ` Eli Zaretskii
2016-03-20 19:15       ` martin rudalics
2016-03-21  7:36         ` Paul Eggert
2016-03-21  9:22           ` martin rudalics
2016-03-21 17:55             ` Paul Eggert
2016-03-22 10:22               ` martin rudalics
2016-03-22 10:36                 ` Andreas Schwab
2016-03-22 10:58                   ` martin rudalics
2016-03-22 11:32                     ` Andreas Schwab
2016-03-22 11:47                       ` martin rudalics
2016-03-22 15:20                         ` Óscar Fuentes
2016-03-22 17:08                           ` martin rudalics
2016-03-22 15:24                         ` Noam Postavsky
2016-03-22 17:08                           ` martin rudalics
2016-03-21 16:06           ` Eli Zaretskii
2016-03-21 17:55             ` John Wiegley
2016-03-21 17:57               ` Paul Eggert
2016-03-21 18:16               ` Eli Zaretskii
2016-03-21 21:27                 ` John Wiegley
2016-03-22  0:17                   ` Paul Eggert
2016-03-22  0:52                     ` Paul Eggert
2016-03-22  3:35                   ` Eli Zaretskii
2016-03-22 16:18                     ` Eli Zaretskii
2016-03-22 16:30                       ` Stefan Monnier
2016-03-22 16:45                         ` Eli Zaretskii
2016-03-22 16:52                           ` Stefan Monnier
2016-03-22 17:03                             ` Eli Zaretskii
2016-03-22 18:21                               ` Paul Eggert
2016-03-22 18:33                                 ` Eli Zaretskii
2016-03-23 13:10                                   ` Stefan Monnier
2016-03-22 18:41                               ` Stefan Monnier
2016-03-22 18:58                                 ` Eli Zaretskii
2016-03-23  2:08                                   ` Stefan Monnier
2016-03-23  8:07                                     ` Andreas Schwab
2016-03-22 19:34                               ` Lars Magne Ingebrigtsen
2016-03-22 19:49                                 ` Eli Zaretskii
2016-03-24  7:18                                 ` Phillip Lord
2016-03-22 18:32                         ` Paul Eggert
2016-03-22 18:37                           ` Eli Zaretskii
2016-03-22 19:15                             ` Paul Eggert
2016-03-22 19:42                               ` Eli Zaretskii
2016-03-22 20:26                                 ` Paul Eggert
2016-03-22 22:57                           ` David Engster
2016-03-22 23:45                             ` Paul Eggert [this message]
2016-03-25  8:52                         ` Eli Zaretskii
2016-03-25  9:14                           ` Andreas Schwab
2016-03-25 10:48                             ` Eli Zaretskii
2016-03-25 11:50                               ` Andreas Schwab
2016-03-25 13:55                                 ` Eli Zaretskii
2016-03-25  9:15                           ` David Engster
2016-03-25 10:50                             ` Eli Zaretskii
2016-03-25 11:38                               ` David Engster
2016-03-25 14:15                                 ` Eli Zaretskii
2016-03-25 16:00                                   ` David Engster
2016-03-25 16:27                                     ` David Engster
2016-03-25 17:33                                     ` Eli Zaretskii
2016-03-25 17:52                                       ` David Engster
2016-03-25 18:43                                         ` Eli Zaretskii
2016-03-25 19:29                                           ` Óscar Fuentes
2016-03-25 19:42                                       ` Paul Eggert
2016-03-26 21:34                                       ` Stefan Monnier
2016-03-22 17:00                       ` Phillip Lord
2016-03-22 18:24                         ` Eli Zaretskii
2016-03-22 19:21                           ` John Wiegley
2016-03-22 19:46                             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F1D91A.8020305@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=deng@randomsample.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.