From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier 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 19:52:08 -0400 Message-ID: References: <83fv88ta5r.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> <83iobth9uw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1431734002 22928 80.91.229.3 (15 May 2015 23:53:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 May 2015 23:53:22 +0000 (UTC) Cc: esr@snark.thyrsus.com, 20292@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 16 01:53:12 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 1YtPPj-0006aE-Mu for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 May 2015 01:53:11 +0200 Original-Received: from localhost ([::1]:33241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtPPi-00047b-TE for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 May 2015 19:53:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtPPf-000476-4F for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 19:53:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtPPa-0005i6-2Y for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 19:53:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtPPZ-0005i2-Vn for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 19:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YtPPZ-00059m-Q4 for bug-gnu-emacs@gnu.org; Fri, 15 May 2015 19:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2015 23:53:01 +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.143173393719743 (code B ref 20292); Fri, 15 May 2015 23:53:01 +0000 Original-Received: (at 20292) by debbugs.gnu.org; 15 May 2015 23:52:17 +0000 Original-Received: from localhost ([127.0.0.1]:46577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YtPOq-00058N-F1 for submit@debbugs.gnu.org; Fri, 15 May 2015 19:52:16 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:59897) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YtPOo-00058A-Bi for 20292@debbugs.gnu.org; Fri, 15 May 2015 19:52:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRFpYts/2dsb2JhbAA3gVOhb4EIgXUBAQQBVh4FBQsLNAcLFBgNJIgTohGLeywDOgkDA4M+Aw4ECoNUBKNjhFg X-IPAS-Result: AgUFAGvvdVRFpYts/2dsb2JhbAA3gVOhb4EIgXUBAQQBVh4FBQsLNAcLFBgNJIgTohGLeywDOgkDA4M+Aw4ECoNUBKNjhFg X-IronPort-AV: E=Sophos;i="5.11,557,1422939600"; d="scan'208";a="120085974" Original-Received: from 69-165-139-108.dsl.teksavvy.com (HELO pastel.home) ([69.165.139.108]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 May 2015 19:52:09 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5F57D2602; Fri, 15 May 2015 19:52:08 -0400 (EDT) In-Reply-To: <83iobth9uw.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 May 2015 23:19:35 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:102853 Archived-At: > 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". That sounds right (and is basically what I suggested, tho what I suggested was a boolean to prevent "git add", but indeed we could make it into a 3-way choice between "git add", "git reset", and "do nothing"). If we want something more refined, I think we'd need to more precisely characterize the cases where we want "git add" and those where we want "git reset" (it seems many details are important such as whether the conflict comes from "git merge" or from "git stash", whether there were staged changes before the command was run, maybe more) and AFAIK those cases can't be distinguished solely based on the state of the current file but also depend on the other files in the project. Stefan