From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.devel Subject: Re: Understanding a recent commit in emacs-25 branch [ed19f2] Date: Sun, 03 Apr 2016 20:15:37 +0200 Organization: Linux Private Site Message-ID: <871t6m5zjq.fsf@Rainer.invalid> References: <56FE1882.9030904@cs.ucla.edu> <20160403120300.GB3537@acm.fritz.box> <8760vy6gfi.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459707366 20403 80.91.229.3 (3 Apr 2016 18:16:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Apr 2016 18:16:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 03 20:15:57 2016 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 1ammZ3-000446-Bm for ged-emacs-devel@m.gmane.org; Sun, 03 Apr 2016 20:15:57 +0200 Original-Received: from localhost ([::1]:54690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ammZ2-0002Lu-Q9 for ged-emacs-devel@m.gmane.org; Sun, 03 Apr 2016 14:15:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ammYw-0002LS-UO for emacs-devel@gnu.org; Sun, 03 Apr 2016 14:15:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ammYr-00008v-Ug for emacs-devel@gnu.org; Sun, 03 Apr 2016 14:15:50 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ammYr-00008r-Nt for emacs-devel@gnu.org; Sun, 03 Apr 2016 14:15:45 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ammYp-0003yJ-JX for emacs-devel@gnu.org; Sun, 03 Apr 2016 20:15:43 +0200 Original-Received: from p54b46f42.dip0.t-ipconnect.de ([84.180.111.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Apr 2016 20:15:43 +0200 Original-Received: from Stromeko by p54b46f42.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Apr 2016 20:15:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 60 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p54b46f42.dip0.t-ipconnect.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) Cancel-Lock: sha1:yusADGqyRhq4GCuVSWcvRESH04Q= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:202644 Archived-At: Stefan Monnier writes: >>> It was git that prepared the merge, not me. >> Blaming the tools? > > Yes. Git makes it all too easy here to create such annoying merge > commits, and if you don't have enough experience with Git you won't > even notice it. Git actually stopped and asked to fix the conflicts I must assume. I don't know which Git version Alan is using under what localization, but here an intentionally created merge conflict will create this message (I've set LC_MESSAGES=POSIX to avoid the localization): Auto-merging lisp/net/tramp-sh.el CONFLICT (content): Merge conflict in lisp/net/tramp-sh.el Automatic merge failed; fix conflicts and then commit the result. Note that nothing there even suggests you should do a manual merge, which is what Alan tells us he has done (I don't know if that's what he did). > But even if you do notice it, it can be pretty challenging to fix it > after the fact, or to avoid it before the fact. Either of git merge --abort git --reset merge would have put you back on square one to try again. Also, based on what Alan said I believe there was just a single conflict, which would presumably have been easy to fix and commit. And there's alway the possibility to branch just before any operation you think might fail (and if you forgot to do that there's the reflog). > It's not just that Git is a sharp tool here: in this instance, it makes > it easy to do the wrong thing, and hard to do the right thing. I don't think so. For an upstream-tracking branch rebase=true should be the default. For feature-branches that merge from some other branch, you can still rebase, but should preserve the merges from the other branch (rebase=preserve). Both settings can be made the default on a per-branch basis to save you the bother of typing and remebering. I'd like to recommend again to anyone using a DVCS to just play around with a few throwaway clones of a reasonably sized repository. Once you think that you understand what's going on, try to break things: introduce conflicts, delete files from the worktree, commit to the wrong branch, whatever. Then find out what exactly broke and how to fix it. This doesn't take all that long, about an hour or two should cover a lot of ground already. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada