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

Re: More gitweb queries..

From
Junio C Hamano <junkio@cox.net>
Date
May 30, 2005, 07:57 UTC
Message-ID
<7vmzqd4041.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050530013056.GH12290@cip.informatik.uni-erlangen.de>
>>>>> "TG" == Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:

TG> Note: If I pull into an empty tree (no HEAD) there is only one head in TG> this array which corresponds to the remote_head. Otherwise the first TG> element is *always* the local HEAD.

"An empty tree (no HEAD)"? Is your definition of "an empty tree" the same as "empty" directory after you do "mkdir empty && cd empty && git-init-db", followed by bunch of git-*-pull to get the objects and commits from other reposititories being involved in the merge but without touching .git/HEAD? If so, why cannot I do the git-*-pull from multiple repositories and merge them together? Why "there is only one head in this array that is remote_head"? Oh, I guess I am missing your definition of "remote_head". Puzzled...

Anyhow I presume that if your ${GIT-.git}/HEAD exists, you include it as the first element of MERGE_HEADS.

TG> I have a function merge which gets a sorted array of heads. Heads can be TG> unlimited at the time because some of the heads can be included into TG> other heads (they're a subset) and so they don't show up in the commit TG> object. I call this array MERGE_HEADS.

Sorry I am not very good at this "thinking" thing, and I need to draw pictures. Please bear with me.

    (line of dev C)-------------C    We are here, trying to merge
    (line of dev B)---(merge)---B    these three lines of devs:
    (line of dev A)---A/             A, B and C
    MERGE_HEADS = (A B C)
    A is actually a "subset" of B

Is this what you mean by "subset"? Are these "subset" HEAD the only thing that causes fast forwards?

My gut feeling without thinking much is that it might be easier to first cull such fast forward heads by using N-way rev-tree before you do anything else. If only one head survives after that, then that head would be your new head and you do not have to go through any merges. Otherwise you merge those independent heads without worrying about fast forwards. How does that sound?

Previous: Thomas GlanzmannNext: Thomas Glanzmann
Message 25 of 42 in “More gitweb queries..”
  1. Linus TorvaldsMay 27, 2005
  2. Thomas GlanzmannMay 27, 2005
  3. Junio C HamanoMay 27, 2005
  4. Thomas GlanzmannMay 27, 2005
  5. Junio C HamanoMay 27, 2005
  6. Linus TorvaldsMay 27, 2005
  7. Junio C HamanoMay 27, 2005
  8. Thomas GlanzmannMay 27, 2005
  9. Linus TorvaldsMay 27, 2005
  10. Junio C HamanoMay 27, 2005
  11. Thomas GlanzmannMay 27, 2005
  12. Junio C HamanoMay 27, 2005
  13. Linus TorvaldsMay 27, 2005
  14. Thomas GlanzmannMay 27, 2005
  15. Junio C HamanoMay 28, 2005
  16. Thomas GlanzmannMay 29, 2005
  17. Thomas GlanzmannMay 29, 2005
  18. Thomas GlanzmannMay 29, 2005
  19. Thomas GlanzmannMay 29, 2005
  20. Thomas GlanzmannMay 29, 2005
  21. Junio C HamanoMay 30, 2005
  22. Junio C HamanoMay 30, 2005
  23. Thomas GlanzmannMay 30, 2005
  24. Thomas GlanzmannMay 30, 2005
  25. Junio C HamanoMay 30, 2005
  26. Thomas GlanzmannMay 30, 2005
  27. Thomas GlanzmannMay 30, 2005
  28. Junio C HamanoMay 30, 2005
  29. Thomas GlanzmannMay 30, 2005
  30. Junio C HamanoMay 30, 2005
  31. Thomas GlanzmannMay 27, 2005
  32. Junio C HamanoMay 27, 2005
  33. Linus TorvaldsMay 27, 2005
  34. Benjamin HerrenschmidtMay 27, 2005
  35. Kay SieversMay 27, 2005
  36. Daniel SerpellMay 28, 2005
  37. David LangMay 28, 2005
  38. Kay SieversMay 28, 2005
  39. Kay SieversMay 28, 2005
  40. Benjamin HerrenschmidtMay 28, 2005
  41. Paul MackerrasMay 30, 2005
  42. Jeff EplerMay 31, 2005

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.