From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: Resuming M-x gitmerge Date: Mon, 11 Jun 2018 21:31:42 +0200 Message-ID: <87efhd6rxd.fsf@randomsample> References: <87h8mayz71.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528745402 18047 195.159.176.226 (11 Jun 2018 19:30:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2018 19:30:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: Glenn Morris , Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 11 21:29:58 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fSSVq-0004Yb-5R for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2018 21:29:58 +0200 Original-Received: from localhost ([::1]:50989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSSXx-00010W-2S for ged-emacs-devel@m.gmane.org; Mon, 11 Jun 2018 15:32:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSSXp-0000zY-Rq for emacs-devel@gnu.org; Mon, 11 Jun 2018 15:32:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSSXl-0000pv-T9 for emacs-devel@gnu.org; Mon, 11 Jun 2018 15:32:01 -0400 Original-Received: from randomsample.de ([5.45.97.173]:55822) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSSXl-0000m0-Il; Mon, 11 Jun 2018 15:31:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=EyEJQCX2itSahSUGtGwzOTcZG6f8Hy5brQGKsoQaox0=; b=nglwL5w6O1orRTslS7kU0L1u/o7ofzm5tVwQXA8KxsfDtcWsa+9NnGPD8r4CSDKUWWTP305oC7ExX0HwISIcBpFj/h/08gTVGlurquhpaMXLwSF3DiFaySmTpbvUjWll; Original-Received: from ip4d1684c5.dynamic.kabel-deutschland.de ([77.22.132.197] helo=void) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fSSXc-0002rL-G5; Mon, 11 Jun 2018 21:31:48 +0200 In-Reply-To: (Noam Postavsky's message of "Mon, 11 Jun 2018 12:12:09 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.45.97.173 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:226236 Archived-At: Noam Postavsky writes: > On 11 June 2018 at 11:50, Glenn Morris wrote: >> Noam Postavsky wrote: >> >>> When M-x gitmerge hits a conflict, it shows a window with the message: > >>> >>> Resolve the conflicts manually, then run gitmerge again. >>> Note: >>> - You don't have to add resolved files or commit the merge yourself (but you can). >> [...] >>> The first note is either wrong, or I'm misunderstanding it. If I don't >>> 'git add' the resolved files and commit the merge, then trying to run >>> M-x gitmerge again fails with (user-error "Repository is not clean"). >> >> Maybe it's just badly worded? You have to resolve the conflict someway. >> This is either by editing the conflicted file and using "git add" to >> mark it as resolved, or by reset+checkout (or whatever the voodooo is) >> to discard the changes altogether. I don't remember needing to manually >> "commit" myself. Normally I think I do: >> >> M-x gitmerge >> fix conflict >> git add to mark conflict resolved >> (unless eg smerge has automatically done that) >> M-x gitmerge > > Hmm, this didn't work for me, I needed to commit the merge. > And given the current implementation of gitmerge-repo-clean I can't > see how it could work any other way. Look in `gitmerge-maybe-resume': It checks if there's an ongoing merge (by checking for .git/MERGE_HEAD) and also a status file from a previous gitmerge run. If that is both the case and the user accepts the resume, it will jump to `gitmerge-resolve-unmerged', which should add all non-conflicted files and commit the merge. -David