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

[TOPIC 5/8] Server side merges and rebases

From
Taylor Blau <me@ttaylorr.com>
Date
Sep 29, 2022, 19:21 UTC
Message-ID
<YzXwKXSQwE4NKdIV@nand.local>
In-Reply-To
<YzXvMRc6X60kjVeY@nand.local>
# Server side merges and rebases (& new rebase/cherry-pick UI?) (Elijah)
- Elijah: tried to implement the git side of the cherry pick as flags to
	git merge subcommand, but everything turned out to be incompatible.
	Used git merge-tree instead, much better, but this doesn't create a
	new commit, only a new top-level tree.
- Rebase and cherry-pick is even more tricky because we need sequences
	of commits. Does the current UI make sense?
- I want to create commits on a not-checked out branch, or rebase, or
	cherry-pick. Not only on the server, but on any client.
- Rebase skips cherry-picks, but that is probably just an optimization
	for when rebase for a shell script. Always doing cherry-picks is
		faster these days, but is a behavior change
- Creating a new commit and modifying the working tree - this lets hooks
	run, but I don't want them to run the server
- Rebase and cherry-pick are typically centered around HEAD, I would
	prefer to replace with just a commit range. If you don't make the
	assumption around HEAD, cherry-pick and rebase aren't that different.
- How do we display conflicts generated on the server side so that ? We
	don't have a representation for that. Taylor: Probably just block the
	operation on the server. Elijah: That's my intuition too.
- We have a lot of users who want to cherry-pick a commit on a bunch of
	LTS branches, it would be great if they don't have to check out those
	branches.
- What about cherry-picking to older branches? It's super slow to check
	out the old branch and it's a big pain to update.
- Want to be able to replay merges. Not just like rebase
	--rebase-merges, but with extra content/resolutions
- Emily: Rebase has famously bad UX. Could we create a new command
	that fixes the problems, like checkout and switch? Elijah: I'm worried
	that I'll copy the old terminology, so I'd need feedback on that.
- Stolee: We could rework the underlying API that supports rebase and
	cherry-pick and use that for the new UX.
	 - Jrnieder: We don't have plumbing commands for this yet, which would
		 be very nice to have. For changes motivated by "cherry-pick has
		 this bad behavior", if we're not making an overall better UX then
		 I'd encourage "go ahead and make cherry-pick no longer have that
		 bad behavior"
	 - Jonathantanmy: I think base + theirs + ours is good enough. Elijah:
		 Sounds like git merge-tree, I don't think that's enough for the
		 server case. I'm sometimes porting over multiple commits instead of
		 just one, ort can do some optimizations on that, but one-by-one
		 invocations would lose that info. Also, this isn't enough to replay
		 merges.
- Peff: It would be good to have a machine-readable representation of a
	conflict that the server can serve, but also can be materialized by
	client tools.  Taylor: It would be even cooler if we could push that
	representation and have "collaborative" merge resolution. Elijah:
	Merge-tree can output files with conflict markers. We'd have to add
	info to represent the index conflict. With rebase, we'd need to
	represent different conflicts at different points.
- Martin: Does ort handle conflicts with renames? E.g. renaming two
	files to the same name. Elijah: Yes
- Elijah: One format would be input to git update-ref --stdin, so
	instead of making all of changes, you could output the data that git
	update-refs can ingest later.
- Waleed: Do you support rebasing non-linear sequences? Elijah: Yes,
	but..  (didn't hear)
Previous: Taylor BlauNext: Taylor Blau
Message 6 of 9 in “Notes from the Git Contributor's Summit, 2022”
  1. Taylor BlauSep 29, 2022
  2. 1/8 Bundle URIsTaylor Blau, Sep 29, 2022
  3. 2/8 State of SHA-256 transitionTaylor Blau, Sep 29, 2022
  4. 3/8 Merge ORT timelineTaylor Blau, Sep 29, 2022
  5. 4/8 Commit `--filter`'sTaylor Blau, Sep 29, 2022
  6. 5/8 Server side merges and rebasesTaylor Blau, Sep 29, 2022
  7. 6/8 State of sparsity workTaylor Blau, Sep 29, 2022
  8. 7/8 Speeding up the connectivity checkTaylor Blau, Sep 29, 2022
  9. 8/8 Using Git securely in shared servicesTaylor Blau, Sep 29, 2022

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.