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: Stupid git! Date: Mon, 14 Sep 2015 08:38:25 -0400 Message-ID: References: <20150912101514.GA2322@acm.fritz.box> <877fnvn9nh.fsf@foo.bar.baz> <20150912130255.GF2322@acm.fritz.box> <83egi3brbw.fsf@gnu.org> <20150912203658.GA3711@acm.fritz.box> <55F48E7F.40602@yandex.ru> <20150912215114.GB3711@acm.fritz.box> <20150914102158.GA3208@acm.fritz.box> <877fntway6.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1442234338 8761 80.91.229.3 (14 Sep 2015 12:38:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Sep 2015 12:38:58 +0000 (UTC) Cc: Alan Mackenzie , Sven Axelsson , emacs To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 14 14:38:50 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 1ZbT20-0002b3-Cd for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2015 14:38:48 +0200 Original-Received: from localhost ([::1]:40430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbT1z-000749-QH for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2015 08:38:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbT1n-000740-1H for emacs-devel@gnu.org; Mon, 14 Sep 2015 08:38:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbT1j-0004FQ-3H for emacs-devel@gnu.org; Mon, 14 Sep 2015 08:38:34 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:65367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbT1e-0004EN-Cc; Mon, 14 Sep 2015 08:38:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CtCwA731xV/0jo92hcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBVh4FBQsLDiYSFBgNJIg3CM8jAQEBBwIBH4s6hQUHhC0FtQQjhBQigngBAQE X-IPAS-Result: A0CtCwA731xV/0jo92hcgxCEAsEMCYdLBAICgTw5FAEBAQEBAQGBCkEFg10BAQMBVh4FBQsLDiYSFBgNJIg3CM8jAQEBBwIBH4s6hQUHhC0FtQQjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="164782620" Original-Received: from 104-247-232-72.cpe.teksavvy.com (HELO ceviche.home) ([104.247.232.72]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Sep 2015 08:38:25 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 623A066110; Mon, 14 Sep 2015 08:38:25 -0400 (EDT) In-Reply-To: <877fntway6.fsf@fencepost.gnu.org> (David Kastrup's message of "Mon, 14 Sep 2015 12:29:37 +0200") 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:189939 Archived-At: > I think that if you have unstaged changes (possibly in files not touched > by the merge) and start a merge (like with git pull or something), then > do git merge --abort this may well get the changes killed for good: git > merge --abort basically has only the index and repository to return to. I don't think this problem exists: the merge code never tries to merge changes into local uncommitted changes (staged or not). The merge doesn't even start if a file has both uncommitted changes and incoming changes. Stefan PS: At least that's my experience, based on looking for ways to do exactly that, since I like to live dangerously and would be really happy if git let me do this. Instead I wrote a "git-merge-force" script which does stash+merge+unstash, with the major downside that the stash+unstash ends up "touch"ing all the locally modified files. So if I have many of them and the merge only touches a could files, that's a lot of wasted work in the subsequent "make".