git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Resolving conflicts

From
Wink Saville <wink@saville.com>
Date
Dec 1, 2006, 07:52 UTC
Message-ID
<456FDF24.1070001@saville.com>
In-Reply-To
<Pine.LNX.4.64.0611302330000.3695@woody.osdl.org>
Linus Torvalds wrote:
Show 45 quoted lines
> 
> On Thu, 30 Nov 2006, Wink Saville wrote:
>> I then searched the net for how to resolve conflicts, seems you
>> should start by doing a git-diff, so I did and I get this:
>>
>>   diff --cc kernel/fork.c
>>   index d74b4a5,8cdd3e7..0000000
>>   --- a/kernel/fork.c
>>   +++ b/kernel/fork.c
>>   diff --cc kernel/spinlock.c
>>   index f4d1718,2c6c2bf..0000000
>>   --- a/kernel/spinlock.c
>>   +++ b/kernel/spinlock.c
> 
> Hmm. That doesn't look like a conflict. If it had a real conflict, I'd 
> have expected to see it mentioned in that diff..
> 
> This may be a stupid question, but if you haven't actually ever needed to 
> do any file-level merges before, this may be the first time you've 
> actually had the external 3-way "merge" program called, and that's one of 
> the few things that git still depends on _external_ programs for. And if 
> that program is broken or missing, you'd get bubkis.
> 
> (This is hopefully getting fixed, and we'll have one less external 
> dependency to worry about, but it's the only thing that springs to mind)
> 
> That's especially true since the merge-head your log shows wasn't even all 
> that long ago: there's just 80 commits since that common merge base, and 
> only two of them even change those two files, and only in rather simple 
> ways at that.
> 
> So my guess is that there wasn't actually a conflict at all, but the 
> "merge" program (usually in /usr/bin/merge) returned an error for some 
> reason. What does "which merge" and "rpm -qf /usr/bin/merge" say?
> 
> But you can also do "git diff --ours" (or "git diff --their") to get a 
> simple two-way diff of the end result of the merge to what you were 
> looking at.
> 
> 		Linus
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Earlier had a problem with git wanting merge but didn't have it and couldn't figure out which package it was in Ubuntu:( So I symlinked merge to kdiff3 which worked at the time:

wink@winkc2d1:~/linux/linux-2.6$ ls -al /usr/bin/merge lrwxrwxrwx 1 root root 6 2006-11-17 19:24 /usr/bin/merge -> kdiff3

But doesn't/didn't work this time.
I tried "git diff --ours"
wink@winkc2d1:~/linux/linux-2.6$ git diff --ours
* Unmerged path kernel/fork.c
diff --git a/kernel/fork.c b/kernel/fork.c
* Unmerged path kernel/spinlock.c
diff --git a/kernel/spinlock.c b/kernel/spinlock.c
wink@winkc2d1:~/linux/linux-2.6$

Wink

Not too helpful:(
Previous: Linus TorvaldsNext: Linus Torvalds
Message 6 of 32 in “Resolving conflicts”
  1. Wink SavilleDec 1, 2006
  2. Alan ChandlerDec 1, 2006
  3. Wink SavilleDec 1, 2006
  4. Alan ChandlerDec 1, 2006
  5. Linus TorvaldsDec 1, 2006
  6. Wink SavilleDec 1, 2006
  7. Linus TorvaldsDec 1, 2006
  8. Linus TorvaldsDec 1, 2006
  9. Alan ChandlerDec 1, 2006
  10. Wink SavilleDec 1, 2006
  11. Alan ChandlerDec 1, 2006
  12. Wink SavilleDec 2, 2006
  13. Linus TorvaldsDec 2, 2006
  14. Junio C HamanoDec 2, 2006
  15. using xdl_merge(), was Re: Resolving conflictsJohannes Schindelin, Dec 2, 2006
  16. Ramsay JonesDec 5, 2006
  17. Linus TorvaldsDec 5, 2006
  18. Junio C HamanoDec 5, 2006
  19. Johannes SchindelinDec 5, 2006
  20. Junio C HamanoDec 5, 2006
  21. xdl_merge(): fix and simplify conflict handlingJohannes Schindelin, Dec 5, 2006
  22. Junio C HamanoDec 5, 2006
  23. Johannes SchindelinDec 5, 2006
  24. Junio C HamanoDec 5, 2006
  25. Jakub NarebskiDec 5, 2006
  26. Johannes SchindelinDec 5, 2006
  27. Junio C HamanoDec 6, 2006
  28. Johannes SchindelinDec 6, 2006
  29. Junio C HamanoDec 6, 2006
  30. Johannes SchindelinDec 6, 2006
  31. Johannes SchindelinDec 5, 2006
  32. Linus TorvaldsDec 1, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.