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: [Emacs-diffs] master b5b0e05: Call `smerge-start-session' even when dealing with a stash conflict Date: Sun, 19 Apr 2015 22:48:24 -0400 Message-ID: References: <20150419192734.3632.17817@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429498133 19167 80.91.229.3 (20 Apr 2015 02:48:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2015 02:48:53 +0000 (UTC) Cc: Dmitry Gutov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 20 04:48:44 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 1Yk1lL-0005Xq-57 for ged-emacs-devel@m.gmane.org; Mon, 20 Apr 2015 04:48:43 +0200 Original-Received: from localhost ([::1]:51639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk1lK-0006Wf-GI for ged-emacs-devel@m.gmane.org; Sun, 19 Apr 2015 22:48:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk1l8-0006WX-CH for emacs-devel@gnu.org; Sun, 19 Apr 2015 22:48:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yk1l5-0001Yy-5A for emacs-devel@gnu.org; Sun, 19 Apr 2015 22:48:30 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:52087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yk1l4-0001Yu-W0 for emacs-devel@gnu.org; Sun, 19 Apr 2015 22:48:27 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t3K2mPm7012659; Sun, 19 Apr 2015 22:48:25 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C959D282C; Sun, 19 Apr 2015 22:48:24 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Sun, 19 Apr 2015 19:27:34 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5281=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5281> : inlines <2753> : streams <1425380> : uri <1910941> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:185687 Archived-At: > + (unless stashed > + ;; Stashes are tricky (bug#20292). > + (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)) I care a lot more about having Git know that the conflict is resolved, than about the fine distinction between what was staged and what wasn't. Actually, I think the above is too ad-hoc, testing `stashed' which is only tangentially related to the problem. Better would be for vc-git-resolve-when-done to check the status of the file and only `git add' it if it doesn't have anything staged yet. So, it would still work as before in the case where there was nothing staged before the "stash pop". Or better yet, do the "mark as resolved" differently, which doesn't involved touching the "staging area". Not sure how to do that, but Git aficionados should be able to find some clever hack for that, involving less than 10 commands. Stefan