From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Stupid git! Date: Mon, 14 Sep 2015 11:09:20 +0000 Message-ID: <20150914110920.GC3208@acm.fritz.box> 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> <55F5DC69.1040104@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1442228907 17564 80.91.229.3 (14 Sep 2015 11:08:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Sep 2015 11:08:27 +0000 (UTC) Cc: Eli Zaretskii , gscrivano@gnu.org, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 14 13:08:18 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 1ZbRcO-0005dM-0w for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2015 13:08:16 +0200 Original-Received: from localhost ([::1]:39847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbRcN-000331-GI for ged-emacs-devel@m.gmane.org; Mon, 14 Sep 2015 07:08:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbRcH-00032n-Ug for emacs-devel@gnu.org; Mon, 14 Sep 2015 07:08:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbRcE-0000Bj-O2 for emacs-devel@gnu.org; Mon, 14 Sep 2015 07:08:09 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:34280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbRcE-0000Bb-Ez for emacs-devel@gnu.org; Mon, 14 Sep 2015 07:08:06 -0400 Original-Received: (qmail 89703 invoked by uid 3782); 14 Sep 2015 11:08:05 -0000 Original-Received: from acm.muc.de (p579E9E99.dip0.t-ipconnect.de [87.158.158.153]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 14 Sep 2015 13:08:04 +0200 Original-Received: (qmail 3627 invoked by uid 1000); 14 Sep 2015 11:09:20 -0000 Content-Disposition: inline In-Reply-To: <55F5DC69.1040104@yandex.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-Received-From: 193.149.48.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:189933 Archived-At: Hello, Dmitry. On Sun, Sep 13, 2015 at 11:28:25PM +0300, Dmitry Gutov wrote: > On 09/13/2015 12:51 AM, Alan Mackenzie wrote: > > On branch master > > Your branch and 'origin/master' have diverged, > > and have 1 and 1 different commit each, respectively. > > (use "git pull" to merge the remote branch into yours) > > All conflicts fixed but you are still merging. > > (use "git commit" to conclude merge) > I think what Git says here is pretty transparent: commit to conclude the > merge. What confused me is that git aborted the merge despite there being no conflicts (i.e., nothing requiring the use of an editor to resolve). git could quite easily have just completed the merge itself instead of aborting it then requiring me to take mechanical actions to complete it. > > :-). OK, but the immediate problem is that _I_ didn't modify > > file-notify-tests.el. Somebody else did, and git put his changes into > > my working directory and `git add'ed it. > Yes, it did. Have you done any non-trivial merges before? That's how > they usually look. No, I've never done a non-trivial merge in git. This one presumably must count as a trivial merge. > The merge commit shouldn't, generally, include any non-mergy changes, so > you're not expected to stage any of the files you've been working on, > before committing. I take it that by "shouldn't .. include include .. non-mergy changes" you mean that when initiating a merge commit, git won't include any non-merge changes in the commit. (The alternative interpretation is that in a merge commit, the user shouldn't include any other changes.) > > I don't have the log entry for > > this change. So am I supposed to just commit this, with my own log > > entry? > The log entry should describe the merge (you could leave the default > message there, unless it's necessary to add more info). I did actually have this log entry, but `git log' didn't display it. The flag --all was needed for that. > > I don't really understand what "you are still merging" is supposed to > > mean. How do I get out of the "merging" state cleanly, without > > commiting somebody else's changes? > The merge commit is *supposed to* include all the changes that have been > merged in. If you take it upon yourself to remove those changes from the > staging area, as a result Emacs won't include them, and it won't be > obvious to most of the people who read emacs-diffs, and then someone > will have to find out the hard way that something's missing. OK, I've got it now. For some reason, git choses to abort the merge, despite there being no conflicts between the changes from upstream and the changes I've committed locally - indeed, to complete the merge is a fully mechanical action, `git commit'. This seeming illogicality is what confused me in the first place. -- Alan Mackenzie (Nuremberg, Germany).