Re: how do I resolve this merge manually + mergetool bug

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: how do I resolve this merge manually + mergetool bug

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:16

Caleb Cushing [off-list ref] writes:
#       unmerged:   profiles/package.mask

on the remote package.mask is a file locally it is a directory.
...
git rm :3:profiles/package.mask
fatal: pathspec ':3:profiles/package.mask' did not match any files
The answer most likely is this but don't do this just yet:

    $ git rm profiles/package.mask

With this, you are saying "For the path profiles/package.mask, the correct
resolution is not to have it".  There is no room for the stage number to
get into the picture when you are talking about the final result.

But I am suspecting that this is because you moved it to somewhere
(perhaps to profiles/package.mask/frotz) while the remote side kept it
intact or modified it in place.  If that is the case, and if the remote
side made an in-place change, you would want to port the change over to
the path you moved the contents to before you actually remove it, so
before running the above "git rm", I would do something like.

    $ git cat-file blob :1:profiles/package.mask >original
    $ git cat-file blob :3:profiles/package.mask >theirs
    $ git cat-file blob profiles/package.mask/frotz >mine
    $ git merge-file mine original theirs
    $ diff -u profiles/package.mask/frotz mine ;# eyeball the merge result
    $ cat mine >profiles/package.mask/frotz

and then finally conclude the merge with:

    $ git rm profiles/package.mask
    $ git add profiles/package.mask/frotz

But if the remote side did not change anything (i.e. original == theirs),
then you do not have to do the file-level merge to update the contents you
moved to a different path.

Re: how do I resolve this merge manually + mergetool bug

From: Caleb Cushing <hidden>
Date: 2016-06-15 22:46:16

On Tue, Feb 24, 2009 at 1:31 AM, Junio C Hamano [off-list ref] wrote:
   $ git cat-file blob :1:profiles/package.mask >original
   $ git cat-file blob :3:profiles/package.mask >theirs
   $ git cat-file blob profiles/package.mask/frotz >mine
   $ git merge-file mine original theirs
   $ diff -u profiles/package.mask/frotz mine ;# eyeball the merge result
   $ cat mine >profiles/package.mask/frotz
so do all this if theirs is different? (at the moment I know it isn't)
and then finally conclude the merge with:

   $ git rm profiles/package.mask
   $ git add profiles/package.mask/frotz
git rm profiles/package.mask

rm 'profiles/package.mask'
rm 'profiles/package.mask'
rm 'profiles/package.mask/gentoo.org'
rm 'profiles/package.mask/java-overlay'
rm 'profiles/package.mask/perl-experimental'
rm 'profiles/package.mask/regen2.org'
rm 'profiles/package.mask/sunrise'
fatal: git rm: profiles/package.mask: Is a directory

and git status still shows..

#       unmerged:   profiles/package.mask

-- 
Caleb Cushing

http://xenoterracide.blogspot.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help