From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20292: 24.5; Saving Git-controlled file with merge conflicts after "stash pop" stages the file Date: Fri, 15 May 2015 23:19:35 +0300 Message-ID: <83iobth9uw.fsf@gnu.org> References: <83fv88ta5r.fsf@gnu.org> <838udm61ur.fsf@gnu.org> <5536FE56.406@yandex.ru> <83egnc4nu5.fsf@gnu.org> <55528906.7060606@yandex.ru> <83zj58jvri.fsf@gnu.org> <834mnfjjlz.fsf@gnu.org> <5554DBB2.3070005@yandex.ru> <83mw17huqr.fsf@gnu.org> <5554EDF5.5050606@yandex.ru> <83iobvhtzw.fsf@gnu.org> <5554F2F3.6010109@yandex.ru> <83fv6zhs3j.fsf@gnu.org> <55550482.1020404@yandex.ru> <83bnhmia75.fsf@gnu.org> <83mw15hdqn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1431721231 23564 80.91.229.3 (15 May 2015 20:20:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 May 2015 20:20:31 +0000 (UTC) Cc: esr@snark.thyrsus.com, 20292@debbugs.gnu.org, dgutov@yandex.ru To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 15 22:20:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1YtM5h-0006Du-Dk for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 May 2015 22:20:17 +0200 Original-Received: from localhost ([::1]:32941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtM5g-0005HC-Pi for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 May 2015 16:20:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtM5d-0005Gv-6y for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 16:20:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtM5a-0006oK-18 for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 16:20:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtM5Z-0006o9-US for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 16:20:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YtM5Z-00088s-8l for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 16:20:09 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2015 20:20:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20292 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20292-submit@debbugs.gnu.org id=B20292.143172119131247 (code B ref 20292); Fri, 15 May 2015 20:20:08 +0000 Original-Received: (at 20292) by debbugs.gnu.org; 15 May 2015 20:19:51 +0000 Original-Received: from localhost ([127.0.0.1]:46505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YtM5G-00087u-Q8 for submit@debbugs.gnu.org; Fri, 15 May 2015 16:19:51 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:48832) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YtM5D-00087f-G3 for 20292@debbugs.gnu.org; Fri, 15 May 2015 16:19:49 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NOE00A00QHP8400@mtaout25.012.net.il> for 20292@debbugs.gnu.org; Fri, 15 May 2015 23:15:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOE005UKQXNOK60@mtaout25.012.net.il>; Fri, 15 May 2015 23:15:28 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102842 Archived-At: > From: Stefan Monnier > Cc: dgutov@yandex.ru, esr@snark.thyrsus.com, 20292@debbugs.gnu.org > Date: Fri, 15 May 2015 16:02:03 -0400 > > >> > That's not the use case we were discussing, though. We were > >> > discussing a use case where the user merged from another repository, > >> > and then wants her uncommitted changes restored. Leaving them staged > >> > will trip the naive users. > >> But Emacs is not the main culprit: Git itself will stage all the > >> non-conflicting changes, so why should this not trip the user similarly? > > The users I have in mind expect Emacs to save them from Git > > idiosyncrasies. > > I don't see how that's relevant. Strange. > By behaving differently from the rest of Git, I'm afraid we'll just > introduce more problems. I'm not afraid of that. > >> IOW if the user gets tripped by Emacs doing "git add" after resolving > >> a unstash conflict, why would that same user not already be tripped > >> identically by Git doing this "git add" on the non-conflicted files? > > Because they don't use Git from the shell, or at least try not to. > > Feel free to change the behavior of vc-git-resolve-when-done for the > case where the unstash was done from within Emacs after you've changed > this unstash to behave the way you want it, rather than the way Git > does it. > > In my case, the unstash is done by Git with no Emacs involvement, and in > that case it seems that "git add" is just the only sane thing to do. Then I guess the only way to stop this endless and futile argument is to have an option that will control whether we "add" or "reset".