From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: git is screwed Date: Fri, 27 Mar 2015 09:09:08 -0400 Message-ID: References: <20150322154147.GA6808@Tron.local> <20150323045209.GA71859@Tron.local> <550FE343.8010607@math.ntnu.no> <55119019.6030507@math.ntnu.no> <5513E96D.8070204@math.ntnu.no> <83twx7n0zz.fsf@gnu.org> <86a8yzshst.fsf@dod.no> <83k2y3mrjk.fsf@gnu.org> <83fv8qnbrk.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427461777 5734 80.91.229.3 (27 Mar 2015 13:09:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Mar 2015 13:09:37 +0000 (UTC) Cc: sb@dod.no, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 27 14:09:28 2015 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 1YbU0o-00043R-FQ for ged-emacs-devel@m.gmane.org; Fri, 27 Mar 2015 14:09:22 +0100 Original-Received: from localhost ([::1]:50148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbU0n-0001aV-OA for ged-emacs-devel@m.gmane.org; Fri, 27 Mar 2015 09:09:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbU0j-0001aE-AD for emacs-devel@gnu.org; Fri, 27 Mar 2015 09:09:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbU0i-0008Jp-Da for emacs-devel@gnu.org; Fri, 27 Mar 2015 09:09:17 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbU0c-0008IP-39; Fri, 27 Mar 2015 09:09:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRBbthL/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMQCzQSFBgNJIgTohGLdiUPOgwDgz4Dg3AEqDs X-IPAS-Result: AgUFAGvvdVRBbthL/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMQCzQSFBgNJIgTohGLdiUPOgwDgz4Dg3AEqDs X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="114736795" Original-Received: from 65-110-216-75.cpe.pppoe.ca (HELO pastel.home) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Mar 2015 09:09:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BC66CD65; Fri, 27 Mar 2015 09:09:08 -0400 (EDT) In-Reply-To: <83fv8qnbrk.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Mar 2015 10:24:31 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:184380 Archived-At: >> > It's a minor mode, so of course it's configurable: just switch it off. >> The "git add" part is independent from smerge-mode (tho they're linked >> by the fact that they both depend on the VC backend being able to >> recognize that a file has conflicts). So turning smerge-mode off won't help. > It wasn't clear from the question what needs to be configurable. > There was another advice, which you elided, that would disable "git > add" as well. IIUC removing vc-find-file-hook from find-file-hook would have other effects beside avoiding the "git add" (IIRC the main one would be to not auto-enable smerge-mode). To only skip the "git add", you'd need to (remove-hook 'after-save-hook 'vc-git-resolve-when-done 'local) but this needs to be done after the corresponding `add-hook'. I haven't checked, but the following might/should work: (add-hook 'find-file-hook (lambda () (remove-hook 'after-save-hook 'vc-git-resolve-when-done 'local)) ;; Put it after VC's vc-find-file-hook. 'append) -- Stefan