All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <ltuikov@yahoo.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: resolve (merge) problems
Date: Thu, 1 Dec 2005 17:44:23 -0800 (PST)	[thread overview]
Message-ID: <20051202014423.56174.qmail@web31801.mail.mud.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0512011556480.3099@g5.osdl.org>

--- Linus Torvalds <torvalds@osdl.org> wrote:
> Well, first off, you would probably have been better off with the smarter 
> recursive merge instead of the old "git resolve":
> 
> 	git merge -s recursive "merge linus' tree" HEAD master
> 
> (the "-s recursive" isn't really needed, it _should_ be the default).
> 
> You can re-try that by doing a "git reset --hard" (to get rid of the 
> partial merge) and just starting over.

Ok, what I've been doing is:
git-read-tree --reset -u <last committish>
git-checkout-index -u -f -a

to "roll-back" the index to the last "good" state.
(but I guess that has the same effect)

Then I re-tried the new git merge, and got this:

$git merge -s recursive "merge linus' tree" HEAD master 
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Traceback (most recent call last):
  File "/home/luben/bin/git-merge-recursive", line 10, in ?
    from heapq import heappush, heappop
ImportError: No module named heapq
Automatic merge failed/prevented; fix up by hand

The git I have is latest: b34403aa97047f90c0cdd5177e63a8e7530e3388

> > The output from git-diff-index is:
> 
> Don't. You'll see all the changes relative to HEAD, which _includes_ all 
> the stuff that got cleanly merged.
> 
> Instead, do just a
> 
> 	git diff
> 
> or perhaps
> 
> 	git-diff-files --name-status
> 
> which will show much better what is going on. In this case, I suspect that 
> the problem is that my branch removed "poodle_defconfig", and you had 
> changes in it, no? Or maybe there were conflicts in atmdev_init.c, so they 
> got left in an unmerged state..

The former.  Simple deletion.  I've noticed that
I've those problems only when the file has been completely
deleted in the tree I'm trying to merge (from).

The index is left in a state where the file doesn't
exist in the working tree but is in the index.

Not sure if this is a general problem.  I'd like to
note though that the branches are in _different_ directories, (different index and HEAD of
course),
but everything else is shared (symlinks).

> 
> Regardless, the git-diff-files interface should show you which files are 
> unmerged and need to be fixed up.
> 
> Just fix them up: either remove them, or edit them to taste, and then do 
> "git-update-index <filename>" (add the "--remove" option if you deleted 
> the file), and then finish it off when you're happy with a "git commit".
> 
> That _should_ fix it all up.

Ok, that worked.  The sequence I did is:

$git reset --hard
$git resolve HEAD master "merge linus' tree"
Trying to merge deda498710e190c7922c2634ed630ee64ce86c05 into
6fea38404a5ce270d73df9cde561135defe9ab39 using 5666c0947ede0432ba5148570aa66ffb9febff5b.
Simple merge failed, trying Automatic merge
Auto-merging MAINTAINERS.
Removing drivers/net/sk98lin/skcsum.c
fatal: merge program failed
Automatic merge failed, fix up by hand
$git-diff-files --name-status
U       drivers/net/sk98lin/skcsum.c
D       drivers/net/sk98lin/skcsum.c
$git-update-index --remove drivers/net/sk98lin/skcsum.c
$git commit -s "merge linus' tree"

And that worked.  But at some point it did the right
thing only with "git resolve ..."  What has changed?

Thanks,
   Luben

      reply	other threads:[~2005-12-02  1:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01 23:18 resolve (merge) problems Luben Tuikov
2005-12-01 23:58 ` Junio C Hamano
2005-12-02  0:07   ` Luben Tuikov
2005-12-02  0:58     ` Junio C Hamano
2005-12-02  1:50       ` Luben Tuikov
2005-12-02  1:58         ` Junio C Hamano
2005-12-02  2:05           ` Luben Tuikov
2005-12-02  5:09             ` Junio C Hamano
2005-12-02 13:59               ` Luben Tuikov
2005-12-02  0:07 ` Linus Torvalds
2005-12-02  1:44   ` Luben Tuikov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051202014423.56174.qmail@web31801.mail.mud.yahoo.com \
    --to=ltuikov@yahoo.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.