From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?R=FCdiger?= Sonderfeld Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add smerge-mode, conflicted-files support to vc-git. Date: Mon, 13 Jan 2014 13:31:21 +0100 Message-ID: <4442754.RCCqqyGa7X@descartes> References: <12408468.cjCttLLJHG@descartes> 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 1389616302 13179 80.91.229.3 (13 Jan 2014 12:31:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jan 2014 12:31:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 13 13:31:48 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 1W2ggE-0007kV-OV for ged-emacs-devel@m.gmane.org; Mon, 13 Jan 2014 13:31:46 +0100 Original-Received: from localhost ([::1]:42070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2ggD-0006PO-WD for ged-emacs-devel@m.gmane.org; Mon, 13 Jan 2014 07:31:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2gg4-0006Oq-7S for emacs-devel@gnu.org; Mon, 13 Jan 2014 07:31:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2gfw-0000wT-Tb for emacs-devel@gnu.org; Mon, 13 Jan 2014 07:31:36 -0500 Original-Received: from ptmx.org ([178.63.28.110]:41339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2gfw-0000vY-N7 for emacs-devel@gnu.org; Mon, 13 Jan 2014 07:31:28 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by ptmx.org (Postfix) with ESMTP id E7A3222B4B; Mon, 13 Jan 2014 13:31:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ptmx.org Original-Received: from ptmx.org ([127.0.0.1]) by localhost (ptmx.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D8WeCBcA2iTC; Mon, 13 Jan 2014 13:31:25 +0100 (CET) Original-Received: from descartes.localnet (chello080108246092.7.14.vie.surfer.at [80.108.246.92]) by ptmx.org (Postfix) with ESMTPSA id 47EA9221CA; Mon, 13 Jan 2014 13:31:24 +0100 (CET) User-Agent: KMail/4.11.3 (Linux/3.11.0-14-generic; KDE/4.11.3; x86_64; ; ) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 178.63.28.110 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:168289 Archived-At: On Saturday 11 January 2014 21:52:23 Stefan Monnier wrote: > This is the main problem, of course. It means running git twice per > file rather than once. We could probably improve this by only callin= g > vc-git-conflicted-files if the file is under Git's control and only i= f > it's locally modified. If you can think of some other check we could= do > to call the file even less frequently, that'd be even better. > > Also, I think the check shouldn't be in find-file-hook but in > vc-git-state (so as to return `conflicted' state). Yes, `vc-git-state' should indicate conflicts. Right now it calls `git= diff- index' and treats U as edit instead of `conflicted'. I'm not very fami= liar=20 with the details of `vc-git' and therefore am not sure if we can simply= change=20 it. The hg implementation lacks a `conflicted' state as well and simply che= cks if=20 the file is edited and looks for the merge markers. Maybe that would b= e=20 enough for git as well. > I haven't looked in detail at the patch but did notice also that > vc-git-conflicted-files is documented to take a `directory' as argume= nt > whereas here you call it with a file name. Yes, `vc-conflicted-files' is documented to take a `directory'. But `v= c-git- conflicted-files' should work with a `file name' argument. I guess thi= s=20 should be documented. Regards, R=C3=BCdiger