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

Re: cherry picking and merge

From
Philip Oakley <philipoakley@iee.org>
Date
Aug 2, 2014, 10:39 UTC
Message-ID
<FAC83E31AC1645EB83068122320F35AE@PhilipOakley>
In-Reply-To
<FC00A4BB-6CB9-421D-83D6-4E1AFBB4CB3C@comcast.net>
From: "Mike Stump" <mikestump@comcast.net>
Sent: Friday, August 01, 2014 11:10 PM
Show 8 quoted lines
> On Aug 1, 2014, at 11:57 AM, Philip Oakley <philipoakley@iee.org> 
> wrote:
>> But that goes both ways, and is a philosophical issue about what is 
>> to be expected in various cases.
>
> The problem is, users expect merge to merge.  There isn’t a user that 
> expects it to scramble the source code, because the command is called 
> merge, not scramble.

Unfortunately we are back at the problem af what 'merge' means. Git uses a snapshot model, while most other version control systems uses a changeset model (which has been used since before the Titanic was built for various reasons [1]) for their storage. Thus most VCS users see merge as the addition of a delta "A + delta -> B", while Git sees merge as the union of snapshots "A + G -> Q".

The cherry-pick and rebase methods determine the change deltas between adjacent snaphots (i.e. patches) and then apply that to a different snapshot. In those cases we are not merging snapshots, rather applying patches (note my changed use of 'merge').

Show 28 quoted lines
>That word has semantics that were not invented by your project.  You 
>cannot change the semantic of the word.  Merge has a nice mathematical 
>definition.  Merge branch into master means, place into into master the 
>work from that branch.  git already does this 99% correct, it is 
>missing one corner case.
>
> This is not a philosophical issue.  It is a definitional one.
>
>> For some central control use styles, the ideas behind _distributed_ 
>> version control are anathema and (Git) just grinds away at the 
>> policies that are expected.
>
> This is irrelevant to the issue at hand.
>
>> That said, Git doesn't claim to be perfect
>
> Again, irrelevant.
>
>> (and can't because
>
> Do you mean, and can’t be?  If so, you are wrong in the case at hand. 
> svn is an existence proof that you are wrong.
>
>> of the 'relativity' that comes with being distributed - truth has to 
>> give way to a web of trust). Also the artefacts that Git validates 
>> are at a different level of abstraction i.e. the whole project as a 
>> commit, rather than just a few/one file at a time.
>
<snipped remainder because of time limitations>

-- Philip

[1] Way back when blueprints really were blue, and real drawing were on kaolin & linen drawing sheets with indian ink, the 'master' drawings were the most prized items, that if damaged would stop production, so there were many layers of drawing office controls to avoid touching it (e.g. tracers to copy drawings) and keep the master drawings pristine.

From that, the ideas of Change requests, Change orders, Approved changes etc. became the norm. It was the changes that were recorded. These processes are still in place today in most engineering companies and the military, in fact anyone with real artefacts. These techniques were copied into the computing world when it was young.

The big change has been that Computing has reduced the cost of production (duplication, replication) to zero, so now the problem is in trying to validate and verify which alledged copy is actually the 'master' - especially in a fully distributed environment, such as the many different Linux distributions and applications. It was into this gap that Git steps, with the use of the sha1 to both validate the history chain and verify any specific snapshot. It doesn't get hung up on what the change was, that can be determined easily after the fact by a simple diff between adjacent snapshots, though having lots of small changes and crisp commit messages does help.

That's the way I view it anyway. (When I first started work, they still had blue prints, but had moved to microfiche and melinex (polyester) drawing sheets, and the 8088 / IBM PC was new and powerful! I still work in engineering where the old VC model is ubiquitous)

Previous: Mike StumpNext: Philip Oakley
Message 7 of 43 in “cherry picking and merge”
  1. Mike StumpAug 1, 2014
  2. brian m. carlsonAug 1, 2014
  3. Jakub NarębskiAug 1, 2014
  4. Mike StumpAug 1, 2014
  5. Philip OakleyAug 1, 2014
  6. Mike StumpAug 1, 2014
  7. Philip OakleyAug 2, 2014
  8. Philip OakleyAug 2, 2014
  9. Sam VilainAug 1, 2014
  10. Mike StumpAug 1, 2014
  11. Nico WilliamsAug 1, 2014
  12. Alex DavidsonAug 2, 2014
  13. Mike StumpAug 6, 2014
  14. Rebase safely (Re: cherry picking and merge)Nico Williams, Aug 6, 2014
  15. Nico WilliamsAug 6, 2014
  16. Mike StumpAug 1, 2014
  17. Keller, Jacob EAug 21, 2014
  18. Keller, Jacob EAug 21, 2014
  19. Nico WilliamsAug 1, 2014
  20. Mike StumpAug 1, 2014
  21. Nico WilliamsAug 1, 2014
  22. Jonathan NiederAug 1, 2014
  23. Jonathan NiederAug 1, 2014
  24. Nico WilliamsAug 1, 2014
  25. Junio C HamanoAug 1, 2014
  26. Nico WilliamsAug 1, 2014
  27. Junio C HamanoAug 1, 2014
  28. Jakub NarębskiAug 6, 2014
  29. Nico WilliamsAug 6, 2014
  30. Junio C HamanoAug 6, 2014
  31. Junio C HamanoAug 6, 2014
  32. Mike StumpAug 1, 2014
  33. Mike StumpAug 1, 2014
  34. Jonathan NiederAug 1, 2014
  35. Fwd: cherry picking and mergeJakub Narębski, Aug 1, 2014
  36. Mike StumpAug 1, 2014
  37. Philip OakleyAug 2, 2014
  38. Jakub NarębskiAug 6, 2014
  39. Mike StumpAug 6, 2014
  40. Nico WilliamsAug 7, 2014
  41. Mike StumpAug 8, 2014
  42. Nico WilliamsAug 8, 2014
  43. Fwd: Rebase safely (Re: cherry picking and merge)Mike Stump, Aug 8, 2014

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.