From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: esr@thyrsus.com (Eric S. Raymond) Newsgroups: gmane.emacs.devel Subject: smerge autolaunch integration for conflicts in git Date: Wed, 13 Aug 2014 05:13:10 -0400 (EDT) Message-ID: <20140813091310.A2525380604@snark.thyrsus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1407921241 30781 80.91.229.3 (13 Aug 2014 09:14:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2014 09:14:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 13 11:13:55 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XHUd0-00013k-KV for ged-emacs-devel@m.gmane.org; Wed, 13 Aug 2014 11:13:54 +0200 Original-Received: from localhost ([::1]:46208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHUd0-0001L7-6L for ged-emacs-devel@m.gmane.org; Wed, 13 Aug 2014 05:13:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHUct-0001Iu-Pl for emacs-devel@gnu.org; Wed, 13 Aug 2014 05:13:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHUcn-0002Tt-IL for emacs-devel@gnu.org; Wed, 13 Aug 2014 05:13:47 -0400 Original-Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:46854 helo=snark.thyrsus.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHUcn-0002Tj-Fk for emacs-devel@gnu.org; Wed, 13 Aug 2014 05:13:41 -0400 Original-Received: by snark.thyrsus.com (Postfix, from userid 1000) id A2525380604; Wed, 13 Aug 2014 05:13:10 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 71.162.243.5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173616 Archived-At: I had a look at R=C3=BCdiger Sonderfeld's patch partially implementing smerge launching for conflicted files in git. Good news: Completing the patch was surprisingly easy. R=C3=BCdiger's premises about vc-git's internals seem correct. The only missing piece was the resolve command the git backend should use when it detects that there are no conflict markers remaining, and that is just "git add" - no dark magic. I have merged the implementation to trunk. Bad news: I don't have a practical way to test this change beyond verifying that the Lisp compiles - it could go pear-shaped when it sees a live conflict. Somebody for which this meets a real use case, like Stefan, will have to try it. Good news: I merged it anyway because if it breaks, it's not going to do so seriously and should be easy to fix. Multiple git adds on a file are harmless. The most likely failure is that the regexp for detecting conflicts in a status listing is slightly off, in which case the launch hook will simply not fire. Bad news: I wanted to do this really elegantly, by pulling most of the smerge launch logic into vc-git.el. Alas, it's not possible without = a fairly large and disruptive refactoring (which probably shouldn't be done before 24 release). Before even thinking further in that direction I want to make sure this patch actually works. --=20 Eric S. Raymond Men trained in arms from their infancy, and animated by the love of liber= ty, will afford neither a cheap or easy conquest. -- From the Declaration of the Continental Congress, July 1775.