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

[Summit topic] Server-side merge/rebase: needs and wants?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 21, 2021, 11:56 UTC
Message-ID
<nycvar.QRO.7.76.6.2110211147490.56@tvgsbejvaqbjf.bet>
In-Reply-To
<nycvar.QRO.7.76.6.2110211129130.56@tvgsbejvaqbjf.bet>

This session was led by Elijah Newren. Supporting cast: Christian Couder, Jonathan "jrnieder" Nieder, brian m. carlson, Toon Claes, Orgad Shaneh, Johannes "Dscho" Schindelin, Derrick Stolee, Philip Oakley, Jeff "Peff" King, CB Bailey, Ævar Arnfjörð Bjarmason, and Phillip Wood.

Notes:
 1.  https://github.com/git/git/pull/1114
 2.  Not about exposing merge over Git protocol, but about providing plumbing
     for a server to use to run a merge
 3.  Not only merge/rebase, but also cherry-pick, revert
 4.  merge-ORT makes things a bit better, as it doesn’t have some of the
     problems of the recursive algorithm.
 5.  The challenge is not necessarily the technical challenges, but the UX for
     server tools that live “above” the git executable.
     1. What kind of output is needed? Machine-readable error messages?
     2. What Git objects must be created: a tree? A commit?
     3. How to handle, report, and store conflicts? Index is not typically
        available on the server.
 6.  Use case?
     1.  Currently servers use libgit2 to do these algorithms instead of git
         itself.
     2.  What would it take for us to move the servers off of libgit2 and onto
         Git?
     3.  This would help with a lot of compatibility issues (sha-256, new data
         formats)
     4.  Server cares about the exit code to record the success of the
         operation, including some details around which conflicts happened.
     5.  MUST NOT WRITE A REF in-process (because of replication), so must be
         at a deep plumbing level.
     6.  How to restart the merge once a user has submitted conflict
         resolutions?
     7.  Christian: GitLab also uses libgit2, would like to use C Git. Want to
         not need a worktree for scratch space.
     8.  jrnieder: Write tree with conflict markers and report the conflict
         (just a boolean), at least as an optional mode (JGit does this and
         Gerrit relies on it)
         1. Including when merging binary files, rename conflicts, etc where
            there’s no place to put the conflict markers
     9.  brian: fail-fast mode. Present that a conflict happens very quickly,
         allow conflict marker computation to be done later, upon user request
         or as a background job.
     10. Toon: GitLab would love to use merge ORT, and collaborate on it
     11. Orgad: In case you do have conflicts, does a mergetool-style frontend
         want the three competing versions?
 7.  Dscho: there’s a little-used “git merge-tree” plumbing command
     1. jrnieder: it’s a low-level doesn’t-resolve-conflicts thing, but nothing
        forces us to keep it that way. Intriguing idea
 8.  Difference between rebase and cherry-pick not all that big, apart from
     looking at HEAD (which does not make sense on the server-side)
 9.  --onto already strains the concept of the rebase, should maybe not be
     implicit.
 10. Stolee: Think about future extensibility: e.g., servers might want to
     support --autosquash
 11. It would be nice to rebase multiple, interconnected branches at the same
     time. But how to specify that?
 12. Dscho: I have this problem quite often with my many stacked patch series
 13. I use --recreate-merges (uses “label” command), create refs along the way
 14. Philip: I also rebase with merges and then run a script after the fact to
     update refs
 15. Peff: I do something lower-tech. When I have branches depending on each
     other, I set the upstream config. By doing rebases in the right order, the
     right thing happens.
 16. CB: This feature sounds really exciting, often develops parallel,
     semi-independent changes that only come together in an octopus merge at
     the end
 17. Jonathan: Newcomers sometimes put commits that don’t belong together on
     the same branch; I wish there were a smooth way for them to just “drag
     over” a commit, which we don’t currently have because it involves multiple
     branches. Cheering you on.
 18. cherry-pick in the middle of an interrupted rebase
 19. If we unify them, then this gets messy
 20. Dscho: I’m a strong proponent of being able to cherry-pick while you’re
     rebasing. But I’m also missing the ability to do an interactive rebase in
     the middle of an interactive rebase. I implemented a nested interactive
     rebase in the tooling for Git for Windows, which works by prepending the
     current interactive rebase’s todo
 21. Peff: That works in that context, but is not fully generic (no way to
     --abort / --quit). Would want a stack of operations. I have a command
     called “git continue” that continues whatever operation is in progress.
 22. Once we have every high-level operation pushing / popping like this, that
     kind of thing becomes possible.
 23. Toon: I have that too, also “git abort”
 24. CB: “git abort ” is slightly terrifying, we started with git shell and now
     we have git forth :)
 25. Dscho: could standardize on the git-rebase-todo script and add support for
     other operations, tricky bit would be how to implemented nested commands
     in an abortable fashion
 26. Ævar: would be nice if these are pushable/sharable
 27. Is rebase the right top-level command?
 28. Phillip Wood: for refactoring history, would like a different abstraction
     from rebase
 29. I have a script that does that which works well
 30. jrnieder: https://github.com/arxanas/git-branchless has some non rebase
     based history manipulation helpers as well, can be useful for inspiration
 31. Elijah: I’m thinking of a “git replay” command
Previous: Johannes SchindelinNext: Bagas Sanjaya
Message 10 of 58 in “Notes from the Git Contributors' Summit 2021, virtual, Oct 19/20”
  1. Johannes SchindelinOct 21, 2021
  2. [Summit topic] Crazy (and not so crazy) ideasJohannes Schindelin, Oct 21, 2021
  3. Son Luong NgocOct 21, 2021
  4. scripting speedups [was: [Summit topic] Crazy (and not so crazy) ideas]Eric Wong, Oct 26, 2021
  5. Ævar Arnfjörð BjarmasonOct 30, 2021
  6. test suite speedups via some not-so-crazy ideas (was: scripting speedups[...])Ævar Arnfjörð Bjarmason, Nov 3, 2021
  7. Junio C HamanoNov 3, 2021
  8. Johannes SchindelinNov 2, 2021
  9. [Summit topic] SHA-256 UpdatesJohannes Schindelin, Oct 21, 2021
  10. [Summit topic] Server-side merge/rebase: needs and wants?Johannes Schindelin, Oct 21, 2021
  11. Bagas SanjayaOct 22, 2021
  12. Johannes SchindelinOct 22, 2021
  13. Ævar Arnfjörð BjarmasonOct 23, 2021
  14. Taylor BlauNov 8, 2021
  15. Ævar Arnfjörð BjarmasonNov 9, 2021
  16. Christian CouderNov 30, 2021
  17. [Summit topic] Submodules and how to make them worth usingJohannes Schindelin, Oct 21, 2021
  18. [Summit topic] Sparse checkout behavior and plansJohannes Schindelin, Oct 21, 2021
  19. [Summit topic] The state of getting a reftable backend working in git.gitJohannes Schindelin, Oct 21, 2021
  20. Han-Wen NienhuysOct 25, 2021
  21. Ævar Arnfjörð BjarmasonOct 25, 2021
  22. Han-Wen NienhuysOct 26, 2021
  23. Philip OakleyOct 28, 2021
  24. Philip OakleyOct 26, 2021
  25. [Summit topic] Documentation (translations, FAQ updates, new user-focused, general improvements, etc.)Johannes Schindelin, Oct 21, 2021
  26. Jean-Noël AvilaOct 22, 2021
  27. Ævar Arnfjörð BjarmasonOct 22, 2021
  28. Jean-Noël AvilaOct 27, 2021
  29. Jeff KingOct 27, 2021
  30. [Summit topic] Increasing diversity & inclusion (transition to `main`, etc)Johannes Schindelin, Oct 21, 2021
  31. Son Luong NgocOct 21, 2021
  32. vale check, was Re: [Summit topic] Increasing diversity & inclusion (transition to `main`, etc)Johannes Schindelin, Oct 22, 2021
  33. Johannes SchindelinOct 22, 2021
  34. [Summit topic] Improving Git UXJohannes Schindelin, Oct 21, 2021
  35. changing the experimental 'git switch' (was: [Summit topic] Improving Git UX)Ævar Arnfjörð Bjarmason, Oct 21, 2021
  36. Junio C HamanoOct 21, 2021
  37. Bagas SanjayaOct 22, 2021
  38. martinOct 22, 2021
  39. Ævar Arnfjörð BjarmasonOct 22, 2021
  40. Sergey OrganovOct 22, 2021
  41. martinOct 22, 2021
  42. Sergey OrganovOct 23, 2021
  43. MartinOct 24, 2021
  44. Junio C HamanoOct 24, 2021
  45. Ævar Arnfjörð BjarmasonOct 25, 2021
  46. Junio C HamanoOct 25, 2021
  47. Sergey OrganovOct 25, 2021
  48. Ævar Arnfjörð BjarmasonOct 25, 2021
  49. Sergey OrganovOct 27, 2021
  50. [Summit topic] Improving reviewer quality of life (patchwork, subsystem lists?, etc)Johannes Schindelin, Oct 21, 2021
  51. Konstantin RyabitsevOct 21, 2021
  52. Ævar Arnfjörð BjarmasonOct 22, 2021
  53. Missing notes, was Re: Notes from the Git Contributors' Summit 2021, virtual, Oct 19/20Johannes Schindelin, Oct 22, 2021
  54. Johannes SchindelinOct 22, 2021
  55. Johannes SchindelinOct 22, 2021
  56. Johannes SchindelinOct 22, 2021
  57. Let's have public Git chalk talks, was Re: Notes from the Git Contributors' Summit 2021, virtual, Oct 19/20Johannes Schindelin, Oct 22, 2021
  58. Ævar Arnfjörð BjarmasonOct 25, 2021

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.