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

Re: [RFC] [PATCH 0/5] Implement 'prior' commit object links (and

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
May 2, 2006, 07:08 UTC
Message-ID
<46a038f90605020008y7f4193d5vb35ec00e3aeb4b90@mail.gmail.com>
In-Reply-To
<4456A616.6070402@vilain.net>
On 5/2/06, Sam Vilain <sam@vilain.net> wrote:
> Here I'm a little bit confused still. Surely criss-crossing branches
> already don't converge unless the commits are in the same order.

They do under GIT. No matter how much you criss-cross, every time you identify a merge base for the next merge, you are identifying the last commit in common on both branches.

While maybe you didn't have that commit being the tip of a head in your repo, it _is_ the last common point. If your criss-crossing is messy and a few commits are out of order or cherry picked, git-merge has a good chance of spotting it. The whole mechanism tends pulls quite consistently towards convergence.

If the notes in the commit msg aren't consistent and we lose the natural tendency towards convergence that's a major drawback. On the other hand, if two branches have exchanged patches "out of band", git-merge still gets it right most of the time, so perhaps slightly different headers in the commit messages are tolerable?

Junio had written:
> >On the other hand, a "note" field that records on which branch
> >of which repository each commit was made (you need to give each
> >repository-branch an UUID) when you do create a new commit would
> >be a sensible thing to have if somebody cares deeply enough.

I really don't like that -- goes against the grain of really simple, portable repos. I cp -pr repo{,_tmp} all the time to do risky merges or save a heavy download from a remote server. Let me run away from this idea... quick before Linus kills us all ;-)

I did feel a couple of times the need of remembering where I had checked this in -- but it went away quite quickly, must have been a leftover of my Arch days ;-). And it actually got solved by agreeing within my team to a commit message format pretty much like what's used in the kernel. Because the truth is that most of my heads and branches have very "local" names.

cheers,
martin
Previous: Sam VilainNext: Sam Vilain
Message 15 of 16 in “Re: [RFC] [PATCH 0/5] Implement 'prior' commit object links (and”
  1. linux@horizon.comApr 29, 2006
  2. Linus TorvaldsApr 29, 2006
  3. Jakub NarebskiApr 29, 2006
  4. Junio C HamanoApr 29, 2006
  5. Jakub NarebskiApr 29, 2006
  6. Junio C HamanoApr 29, 2006
  7. Jakub NarebskiApr 29, 2006
  8. Jakub NarebskiApr 30, 2006
  9. Junio C HamanoApr 30, 2006
  10. Junio C HamanoMay 1, 2006
  11. Sam VilainMay 1, 2006
  12. Jakub NarebskiMay 1, 2006
  13. Junio C HamanoMay 1, 2006
  14. Sam VilainMay 2, 2006
  15. Martin LanghoffMay 2, 2006
  16. Sam VilainMay 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.