From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20292: 24.5; Saving Git-controlled file with merge conflicts after "stash pop" stages the file Date: Sun, 19 Apr 2015 00:58:47 +0300 Message-ID: <5532D397.8090602@yandex.ru> References: <83fv88ta5r.fsf@gnu.org> <5532ADA3.5000006@yandex.ru> <834mod6xnm.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1429394362 18372 80.91.229.3 (18 Apr 2015 21:59:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Apr 2015 21:59:22 +0000 (UTC) Cc: esr@snark.thyrsus.com, 20292@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 18 23:59:11 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 1Yjala-0006XP-Js for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Apr 2015 23:59:10 +0200 Original-Received: from localhost ([::1]:46954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjalZ-0008KZ-VF for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Apr 2015 17:59:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjalW-0008GP-9h for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2015 17:59:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjalT-0001wW-33 for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2015 17:59:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjalT-0001wN-0A for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2015 17:59:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YjalS-0003ku-Hy for bug-gnu-emacs@gnu.org; Sat, 18 Apr 2015 17:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Apr 2015 21:59:02 +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.142939433914427 (code B ref 20292); Sat, 18 Apr 2015 21:59:02 +0000 Original-Received: (at 20292) by debbugs.gnu.org; 18 Apr 2015 21:58:59 +0000 Original-Received: from localhost ([127.0.0.1]:60249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YjalO-0003kc-He for submit@debbugs.gnu.org; Sat, 18 Apr 2015 17:58:58 -0400 Original-Received: from mail-wi0-f178.google.com ([209.85.212.178]:37327) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YjalM-0003kQ-Rv for 20292@debbugs.gnu.org; Sat, 18 Apr 2015 17:58:57 -0400 Original-Received: by widdi4 with SMTP id di4so54141299wid.0 for <20292@debbugs.gnu.org>; Sat, 18 Apr 2015 14:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ypNy9zbcHoY/9P9RB55N9H8qcUxAnCvTq29uEhfxShY=; b=HrAtKBze1lgfd2XopgPyRAVDCl9A+vhX1km0jNHI287p1raj8yxxzk6z9Vm3wk/d7O D/aSBViKNLo/IBqCZxhm6daQ5D5BmsV0BM7EnDTRVSv9MpARKsAw5bSU/xhxj5dAT9RY bl0QlhsrMUw7fQM4EvqsB5O+X9xVgFie54rMOw4O1JBSAmUPPJyjgpzxot7+4qorspT5 GAtyWgJtsTafNfU1umK3wMIc2B5520hN1aVyBgCq08pLd3lK38UDtend+O3h4fKXTSYQ 4Y8dWOhn/UwJ3yvGITMSpoY82ITLszo72WWrtq2vXRMJQeSee31qkRSbTzt6WttGpFAf Yhrw== X-Received: by 10.194.174.225 with SMTP id bv1mr17957372wjc.101.1429394331294; Sat, 18 Apr 2015 14:58:51 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id g14sm17067253wjs.47.2015.04.18.14.58.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Apr 2015 14:58:50 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 In-Reply-To: <834mod6xnm.fsf@gnu.org> 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:101691 Archived-At: On 04/18/2015 10:31 PM, Eli Zaretskii wrote: > It's best not to run "git add" in the first place in this case. How will we detect it? And why would the user expect this difference in behavior? They'd either have a file nicely resolved, or the conflict unresolved, *and* a part of changes in staging area? > Why not detect that the conflict was from stashed changes? This is > clearly stated at the last conflict marker. The find-file-hook could > detect that and record the information. It's more complicated, but sounds better if we prefer to detect unstashing specifically, as opposed to any conflicts that were created by a non-merge operation, I guess. >> But what's the justification for vc-git-resolve-when-done? > > So that "git commit" would "just work", I presume. A lot of problems start with someone wanting to make something "just work". > That would mean VC behaves wit Git differently than it does with other > VCSes (bzr, at least). You mean smerge-mode, not VC, right? How come? I don't even see > Yes. What if the user called 'git stash apply' instead of 'git stash pop'? > Although IME, Git itself does that when you resolve the last > conflict. But I'm not going to claim that this is 100% accurate, just > that it happened to me when I needed to resolve conflicts from stash. I didn't when I tried it, a couple of times.