From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.devel Subject: Re: git is screwed Date: Wed, 01 Apr 2015 22:41:06 +0200 Message-ID: <551C57E2.7030302@math.ntnu.no> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1427920885 29861 80.91.229.3 (1 Apr 2015 20:41:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Apr 2015 20:41:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 01 22:41:24 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 1YdPRx-0002me-6s for ged-emacs-devel@m.gmane.org; Wed, 01 Apr 2015 22:41:21 +0200 Original-Received: from localhost ([::1]:55026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdPRw-000259-KL for ged-emacs-devel@m.gmane.org; Wed, 01 Apr 2015 16:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdPRs-00021n-HM for emacs-devel@gnu.org; Wed, 01 Apr 2015 16:41:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdPRo-00041T-73 for emacs-devel@gnu.org; Wed, 01 Apr 2015 16:41:16 -0400 Original-Received: from hylle05.itea.ntnu.no ([129.241.56.225]:43838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdPRn-00041J-S6; Wed, 01 Apr 2015 16:41:12 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hylle05.itea.ntnu.no (Postfix) with ESMTP id B704B901254; Wed, 1 Apr 2015 22:41:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hylle05.itea.ntnu.no Original-Received: from [IPv6:2001:4662:4ffb::31d4:d207:e070:71cc] (unknown [IPv6:2001:4662:4ffb:0:31d4:d207:e070:71cc]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hanche) by hylle05.itea.ntnu.no (Postfix) with ESMTPSA id 6AE0690119B; Wed, 1 Apr 2015 22:41:07 +0200 (CEST) User-Agent: Postbox 3.0.11 (Macintosh/20140602) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 129.241.56.225 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:184758 Archived-At: Maybe it is time to revisit this one, in light of what we have learned=20 since. Richard Stallman wrote: > I committed some changes using C-x v v in vc-dir. > Something went wrong with lisp/ChangeLog. > > It appears that my change log entries went into an old version of that > file; I don't know why this happened, since I wrote them today after > doing 'git pull'. (=E2=80=9Ctoday=E2=80=9D in this email is March 22) Ah, but we have the output of git reflog now: dca743f HEAD@{0}: commit: Recognize more format variation. Automatically=20 reshow decrypted text. 1a80be1 HEAD@{1}: commit: Echo area shows when displaying a mime message. 414e79f HEAD@{2}: commit: Prefer IceCat to Firefox and Iceweasel. f1cea3e HEAD@{3}: checkout: moving from TEST to master f1cea3e HEAD@{4}: checkout: moving from master to TEST f1cea3e HEAD@{5}: pull: Fast-forward 3517da7 Head@{6}: clone: from rms@git.sv.gnu.org:/srv/git/emacs.git and there are no traces here of a successful pull after those three=20 commits, which by the wat were all done in quick succession on March 22.=20 The commit they are based on is f1cea3e, which is indeed about 8 weeks=20 old. So it appears that your git pull failed, and you did edit an old=20 lisp/ChangeLog. > After this, I did 'git pull' again, and it said there was a merge > conflict in lisp/ChangeLpg. A lot of text appears to be missing from > the file. It said, "fix conflicts and then commit the result." > > I edited lisp/ChangeLog and tried to commit it with C-x v v. > That gave me the error message > > fatal: cannot do a partial commit during a merge. > > I am now stuck. [=E2=80=A6] > > How can I get this unwedged? We have also learned that =E2=80=9Cgit ls-files -u=E2=80=9D produces no o= utput. That=20 simplifies the available options somewhat, I think, since there are no=20 unmerged files to deal with (they complicate the index quite a lot,=20 since there may be several versions of these files there). The only file different in the index and your working tree is=20 lisp/ChangeLog. If you run =E2=80=9Cgit diff=E2=80=9D, you should see the= difference=20 between those two (in that order), and nothing else. If based on the=20 output, you think the version in your working tree is more appropriate=20 than the one in the index, you should go ahead and run =E2=80=9Cgit add=20 lisp/ChangeLog=E2=80=9D. Otherwise, edit it further until satisfied, then= run=20 =E2=80=9Cgit add lisp/ChangeLog=E2=80=9D, at which point your working tre= e and index are=20 in agreement (and =E2=80=9Cgit diff=E2=80=9D should produce no output). The next thing you could try, is to run this command: git diff origin/master This shows the difference between what is now in the working tree and=20 what got fetched on your last I expect you will see all the changes you=20 have made in your recent work, and nothing else. If so, go ahead and run=20 =E2=80=9Cgit commit=E2=80=9C, but don't try to push yet. Your repository = should now be=20 in a sane state. The only problem is that your latest additions =E2=80=93 the ones you tri= ed to=20 commit with the initial C-x v v =E2=80=93 will now be mixed in with the m= erge=20 commit, which obscures the history. We might want to look into fixing=20 that next. =E2=80=93 Harald