emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resuming M-x gitmerge


From: David Engster
Subject: Re: Resuming M-x gitmerge
Date: Mon, 11 Jun 2018 21:31:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Noam Postavsky writes:
> On 11 June 2018 at 11:50, Glenn Morris <address@hidden> 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 <file> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]